hooks/email.py
changeset 5174 78438ad513ca
parent 4835 13b0b96d7982
child 5423 e15abfdcce38
equal deleted inserted replaced
5173:73760bbb66bd 5174:78438ad513ca
    26 
    26 
    27     def precommit_event(self):
    27     def precommit_event(self):
    28         if self.condition():
    28         if self.condition():
    29             self.session.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})
    32 
    32 
    33 
    33 
    34 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):
    34 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):
    35     rtype = 'primary_email'
    35     rtype = 'primary_email'
    36 
    36