hooks/email.py
changeset 4835 13b0b96d7982
parent 4643 921737d2e3a8
child 5174 78438ad513ca
child 5421 8167de96c523
equal deleted inserted replaced
4834:b718626a0e60 4835:13b0b96d7982
    24         return not any(e for e in self.entity.use_email
    24         return not any(e for e in self.entity.use_email
    25                        if self.email.eid == e.eid)
    25                        if self.email.eid == e.eid)
    26 
    26 
    27     def precommit_event(self):
    27     def precommit_event(self):
    28         if self.condition():
    28         if self.condition():
    29             self.session.unsafe_execute(
    29             self.session.execute(
    30                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,
    30                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,
    31                 {'x': self.entity.eid, 'y': self.email.eid}, 'x')
    31                 {'x': self.entity.eid, 'y': self.email.eid}, 'x')
    32 
    32 
    33 
    33 
    34 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):
    34 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):