hooks/email.py
changeset 10187 0df931eb08de
parent 9990 c84ad981fc4a
parent 10184 c6dfa0d6b7d1
--- a/hooks/email.py	Mon Feb 02 12:32:07 2015 +0100
+++ b/hooks/email.py	Thu Feb 05 15:49:02 2015 +0100
@@ -35,6 +35,10 @@
                        if self.email.eid == e.eid)
 
     def precommit_event(self):
+        if self.cnx.deleted_in_transaction(self.entity.eid):
+            return
+        if self.cnx.deleted_in_transaction(self.email.eid):
+            return
         if self.condition():
             self.cnx.execute(
                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,