equal
deleted
inserted
replaced
33 """check entity has use_email set for the email address""" |
33 """check entity has use_email set for the email address""" |
34 return not any(e for e in self.entity.use_email |
34 return not any(e for e in self.entity.use_email |
35 if self.email.eid == e.eid) |
35 if self.email.eid == e.eid) |
36 |
36 |
37 def precommit_event(self): |
37 def precommit_event(self): |
|
38 if self.cnx.deleted_in_transaction(self.entity.eid): |
|
39 return |
|
40 if self.cnx.deleted_in_transaction(self.email.eid): |
|
41 return |
38 if self.condition(): |
42 if self.condition(): |
39 self.cnx.execute( |
43 self.cnx.execute( |
40 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype, |
44 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype, |
41 {'x': self.entity.eid, 'y': self.email.eid}) |
45 {'x': self.entity.eid, 'y': self.email.eid}) |
42 |
46 |