hooks/notification.py
changeset 6466 43d71dd8a8ec
parent 6142 8bc6eac1fac1
child 6760 2c1fc68ac258
equal deleted inserted replaced
6465:6401a9d0b5aa 6466:43d71dd8a8ec
   138             rqlrestr.append('X %s %s' % (attr, var))
   138             rqlrestr.append('X %s %s' % (attr, var))
   139         rql = 'Any %s WHERE %s' % (','.join(rqlsel), ','.join(rqlrestr))
   139         rql = 'Any %s WHERE %s' % (','.join(rqlsel), ','.join(rqlrestr))
   140         rset = session.execute(rql, {'x': self.entity.eid})
   140         rset = session.execute(rql, {'x': self.entity.eid})
   141         for i, attr in enumerate(attrs):
   141         for i, attr in enumerate(attrs):
   142             oldvalue = rset[0][i]
   142             oldvalue = rset[0][i]
   143             newvalue = self.entity[attr]
   143             newvalue = self.entity.cw_edited[attr]
   144             if oldvalue != newvalue:
   144             if oldvalue != newvalue:
   145                 thisentitychanges.add((attr, oldvalue, newvalue))
   145                 thisentitychanges.add((attr, oldvalue, newvalue))
   146         if thisentitychanges:
   146         if thisentitychanges:
   147             EntityUpdatedNotificationOp(session)
   147             EntityUpdatedNotificationOp(session)
   148 
   148