server/ssplanner.py
branchstable
changeset 6893 2e10337c9c2c
parent 6889 37668bf302f5
child 7118 e094b3d4eb95
--- a/server/ssplanner.py	Tue Jan 25 15:16:05 2011 +0100
+++ b/server/ssplanner.py	Wed Jan 26 10:42:40 2011 +0100
@@ -645,15 +645,16 @@
     def execute(self):
         """execute this step"""
         results = self.execute_child()
-        todelete = frozenset(typed_eid(eid) for eid, in results)
-        session = self.plan.session
-        # mark eids as being deleted in session info and setup cache update
-        # operation (register pending eids before actual deletion to avoid
-        # multiple call to glob_delete_entities)
-        op = CleanupDeletedEidsCacheOp.get_instance(session)
-        actual = todelete - op._container
-        op._container |= actual
-        session.repo.glob_delete_entities(session, actual)
+        if results:
+            todelete = frozenset(typed_eid(eid) for eid, in results)
+            session = self.plan.session
+            # mark eids as being deleted in session info and setup cache update
+            # operation (register pending eids before actual deletion to avoid
+            # multiple call to glob_delete_entities)
+            op = CleanupDeletedEidsCacheOp.get_instance(session)
+            actual = todelete - op._container
+            op._container |= actual
+            session.repo.glob_delete_entities(session, actual)
         return results
 
 class DeleteRelationsStep(Step):