1. Chad Dombrova
  2. django-denormalize


Chad Dombrova  committed e5aaad2

Fix a bug with post_delete

  • Participants
  • Parent commits e4d15b8
  • Branches external_triggers

Comments (0)

Files changed (1)

File denormalize/orms/base.py

View file
         if self.is_root_model:
             # if `primary_key` represents an instance of the root model which
             # has been deleted, queue its deletion from the backend
-            for doc_id in self.collection.map_affected(set([primary_key])):
+            if isinstance(primary_key, tuple):
+                primary_key = set(primary_key)
+            for doc_id in self.collection.map_affected(primary_key):
                 self.backend._queue_deleted(self.collection, doc_id)
         # if any dependent model instance have been deleted, queue a change