hooks/email.py
branchstable
changeset 4643 921737d2e3a8
parent 4252 6c4f109c2b03
child 4835 13b0b96d7982
--- a/hooks/email.py	Thu Feb 18 15:42:29 2010 +0100
+++ b/hooks/email.py	Fri Feb 19 09:34:14 2010 +0100
@@ -8,7 +8,6 @@
 __docformat__ = "restructuredtext en"
 
 from cubicweb.server import hook
-from cubicweb.server.repository import ensure_card_respected
 
 from logilab.common.compat import any
 
@@ -27,11 +26,6 @@
 
     def precommit_event(self):
         if self.condition():
-            # we've to handle cardinaly by ourselves since we're using unsafe_execute
-            # but use session.execute and not session.unsafe_execute to check we
-            # can change the relation
-            ensure_card_respected(self.session.execute, self.session,
-                                  self.entity.eid, self.rtype, self.email.eid)
             self.session.unsafe_execute(
                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,
                 {'x': self.entity.eid, 'y': self.email.eid}, 'x')