hooks/email.py
changeset 10184 c6dfa0d6b7d1
parent 9984 793377697c81
child 10187 0df931eb08de
--- a/hooks/email.py	Fri Jan 16 10:57:02 2015 +0100
+++ b/hooks/email.py	Fri Jan 16 17:48:16 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,