cubicweb/hooks/notification.py
changeset 11129 97095348b3ee
parent 11084 ffd615e626f9
parent 11057 0b59724cb3f2
child 11767 432f87a63057
equal deleted inserted replaced
11128:9b4de34ad394 11129:97095348b3ee
   165 class EntityUpdateHook(NotificationHook):
   165 class EntityUpdateHook(NotificationHook):
   166     __regid__ = 'notifentityupdated'
   166     __regid__ = 'notifentityupdated'
   167     __abstract__ = True # do not register by default
   167     __abstract__ = True # do not register by default
   168     __select__ = NotificationHook.__select__ & hook.issued_from_user_query()
   168     __select__ = NotificationHook.__select__ & hook.issued_from_user_query()
   169     events = ('before_update_entity',)
   169     events = ('before_update_entity',)
   170     skip_attrs = set()
   170     skip_attrs = set(['modification_date'])
   171 
   171 
   172     def __call__(self):
   172     def __call__(self):
   173         cnx = self._cw
   173         cnx = self._cw
   174         if cnx.added_in_transaction(self.entity.eid):
   174         if cnx.added_in_transaction(self.entity.eid):
   175             return # entity is being created
   175             return # entity is being created