hooks/notification.py
changeset 3422 089c4b71ac16
parent 3418 7b49fa7e942d
child 3427 78dfef45ee48
equal deleted inserted replaced
3421:7fec79c1c11f 3422:089c4b71ac16
    18     """delay rendering of notification view until precommit"""
    18     """delay rendering of notification view until precommit"""
    19     def precommit_event(self):
    19     def precommit_event(self):
    20         view = self.view
    20         view = self.view
    21         if view.cw_rset is not None and not view.cw_rset:
    21         if view.cw_rset is not None and not view.cw_rset:
    22             return # entity added and deleted in the same transaction (cache effect)
    22             return # entity added and deleted in the same transaction (cache effect)
    23         if view.cw_rset and self.session.deleted_in_transaction(view.cw_rset[cw_rset.cw_row or 0][cw_rset.cw_col or 0]):
    23         if view.cw_rset and self.session.deleted_in_transaction(view.cw_rset[view.cw_row or 0][view.cw_col or 0]):
    24             return # entity added and deleted in the same transaction
    24             return # entity added and deleted in the same transaction
    25         self.view.render_and_send(**getattr(self, 'viewargs', {}))
    25         self.view.render_and_send(**getattr(self, 'viewargs', {}))
    26 
    26 
    27 
    27 
    28 class NotificationHook(hook.Hook):
    28 class NotificationHook(hook.Hook):