equal
deleted
inserted
replaced
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 |