hooks/integrity.py
branchstable
changeset 5449 a7e1b316af03
parent 5448 9bf648d678cd
child 5450 269dcd14b92c
--- a/hooks/integrity.py	Fri Apr 30 16:39:50 2010 +0200
+++ b/hooks/integrity.py	Fri Apr 30 18:24:29 2010 +0200
@@ -164,7 +164,7 @@
     """
     def precommit_event(self):
         session = self.session
-        for values in session.transaction_data['check_constraints_op']:
+        for values in session.transaction_data.pop('check_constraints_op'):
             eidfrom, rtype, eidto = values[:3]
             # first check related entities have not been deleted in the same
             # transaction
@@ -225,7 +225,7 @@
                 constraints = [c for c in eschema.rdef(attr).constraints
                                if isinstance(c, (RQLUniqueConstraint, RQLConstraint))]
                 if constraints:
-                    hook.set_operation(self._cw, 'check_constraint_op',
+                    hook.set_operation(self._cw, 'check_constraints_op',
                                        (self.entity.eid, attr, None) + tuple(constraints),
                                        _CheckConstraintsOp)