--- a/hooks/email.py Wed Sep 23 12:29:53 2009 +0200
+++ b/hooks/email.py Wed Sep 23 12:30:56 2009 +0200
@@ -27,9 +27,9 @@
# 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(session.execute, session,
- self.fromeid, self.rtype, self.toeid)
- session.unsafe_execute(
+ 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')