hooks/email.py
changeset 9614 e5ba755d8ca7
parent 8544 3d049071957e
child 9892 928732ec00dd
child 9984 793377697c81
equal deleted inserted replaced
9613:45370ea9f495 9614:e5ba755d8ca7
    36         return not any(e for e in self.entity.use_email
    36         return not any(e for e in self.entity.use_email
    37                        if self.email.eid == e.eid)
    37                        if self.email.eid == e.eid)
    38 
    38 
    39     def precommit_event(self):
    39     def precommit_event(self):
    40         if self.condition():
    40         if self.condition():
    41             self.session.execute(
    41             self.cnx.execute(
    42                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,
    42                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,
    43                 {'x': self.entity.eid, 'y': self.email.eid})
    43                 {'x': self.entity.eid, 'y': self.email.eid})
    44 
    44 
    45 
    45 
    46 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):
    46 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):