hooks/email.py
changeset 3431 6944a92c16f2
parent 3421 7fec79c1c11f
child 3721 a02f7df5bbec
equal deleted inserted replaced
3423:d1356e008b19 3431:6944a92c16f2
    31                                   self.entity.eid, self.rtype, self.email.eid)
    31                                   self.entity.eid, self.rtype, self.email.eid)
    32             self.session.unsafe_execute(
    32             self.session.unsafe_execute(
    33                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,
    33                 'SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % self.rtype,
    34                 {'x': self.entity.eid, 'y': self.email.eid}, 'x')
    34                 {'x': self.entity.eid, 'y': self.email.eid}, 'x')
    35 
    35 
       
    36 
    36 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):
    37 class SetPrimaryEmailRelationOp(SetUseEmailRelationOp):
    37     rtype = 'primary_email'
    38     rtype = 'primary_email'
    38 
    39 
    39     def condition(self):
    40     def condition(self):
    40         """check entity has no primary_email set"""
    41         """check entity has no primary_email set"""