hooks/metadata.py
changeset 10182 116b24efad0e
parent 9774 b7b71be569cf
child 10209 4c64a41c0a1d
--- a/hooks/metadata.py	Thu Jan 29 16:18:23 2015 +0100
+++ b/hooks/metadata.py	Thu Jan 15 15:45:09 2015 +0100
@@ -93,6 +93,10 @@
 class SyncOwnersOp(hook.DataOperationMixIn, hook.Operation):
     def precommit_event(self):
         for compositeeid, composedeid in self.get_data():
+            if self.cnx.deleted_in_transaction(compositeeid):
+                continue
+            if self.cnx.deleted_in_transaction(composedeid):
+                continue
             self.cnx.execute('SET X owned_by U WHERE C owned_by U, C eid %(c)s,'
                                  'NOT EXISTS(X owned_by U, X eid %(x)s)',
                                  {'c': compositeeid, 'x': composedeid})