[integrity hooks] remove dead code stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 10 Jun 2011 17:21:11 +0200
branchstable
changeset 7494 be957035f2a8
parent 7487 2108961864d3
child 7495 09d245a9bf5f
[integrity hooks] remove dead code
hooks/integrity.py
--- a/hooks/integrity.py	Thu Jun 09 16:56:03 2011 +0200
+++ b/hooks/integrity.py	Fri Jun 10 17:21:11 2011 +0200
@@ -150,21 +150,6 @@
                     op = _CheckORelationOp.get_instance(self._cw)
                 op.add_data((eid, rschema.type))
 
-    def before_delete_relation(self):
-        rtype = self.rtype
-        if rtype in DONT_CHECK_RTYPES_ON_DEL:
-            return
-        session = self._cw
-        eidfrom, eidto = self.eidfrom, self.eidto
-        pendingrdefs = session.transaction_data.get('pendingrdefs', ())
-        if (session.describe(eidfrom)[0], rtype, session.describe(eidto)[0]) in pendingrdefs:
-            return
-        card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality')
-        if card[0] in '1+' and not session.deleted_in_transaction(eidfrom):
-            _CheckSRelationOp.get_instance(self._cw).add_data((eidfrom, rtype))
-        if card[1] in '1+' and not session.deleted_in_transaction(eidto):
-            _CheckORelationOp.get_instance(self._cw).add_data((eidto, rtype))
-
 
 class _CheckConstraintsOp(hook.DataOperationMixIn, hook.LateOperation):
     """ check a new relation satisfy its constraints """