# HG changeset patch # User Sylvain Thénault # Date 1307719271 -7200 # Node ID be957035f2a8786ab75f11dd91c1e005dc990bb4 # Parent 2108961864d3d9e6e1f88c498b8f02800da09d32 [integrity hooks] remove dead code diff -r 2108961864d3 -r be957035f2a8 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 """