hooks/notification.py
branchstable
changeset 4584 eef17cfcfa9c
parent 4307 7fba9c34c88f
child 4719 aaed3f813ef8
equal deleted inserted replaced
4583:356f08325072 4584:eef17cfcfa9c
   124         for i, attr in enumerate(attrs):
   124         for i, attr in enumerate(attrs):
   125             var = chr(65+i)
   125             var = chr(65+i)
   126             rqlsel.append(var)
   126             rqlsel.append(var)
   127             rqlrestr.append('X %s %s' % (attr, var))
   127             rqlrestr.append('X %s %s' % (attr, var))
   128         rql = 'Any %s WHERE %s' % (','.join(rqlsel), ','.join(rqlrestr))
   128         rql = 'Any %s WHERE %s' % (','.join(rqlsel), ','.join(rqlrestr))
   129         rset = session.execute(rql, {'x': self.entity.eid}, 'x')
   129         rset = session.unsafe_execute(rql, {'x': self.entity.eid}, 'x')
   130         for i, attr in enumerate(attrs):
   130         for i, attr in enumerate(attrs):
   131             oldvalue = rset[0][i]
   131             oldvalue = rset[0][i]
   132             newvalue = self.entity[attr]
   132             newvalue = self.entity[attr]
   133             if oldvalue != newvalue:
   133             if oldvalue != newvalue:
   134                 thisentitychanges.add((attr, oldvalue, newvalue))
   134                 thisentitychanges.add((attr, oldvalue, newvalue))