Commits

Viorel Stirbu committed aeb3025

use set() instead of dict.viewkeys() for python 2.6 compatibility

  • Participants
  • Parent commits d5afedb

Comments (0)

Files changed (1)

atexpc/atex_web/management/commands/sync_products.py

                     logger.debug("Update %s", updated_product)
                     updated_product.save()
 
-        insert_ids = products.viewkeys() - existing_products.viewkeys()
+        insert_ids = set(products) - set(existing_products)
         if insert_ids:
             insert_list = [Product(**products[i]) for i in insert_ids]
             logger.debug("Insert %s", insert_list)