hooks/notification.py
changeset 8236 cc70da744f43
parent 8190 2a3c1b787688
parent 8227 884405bf3621
child 8896 3e414a53e794
equal deleted inserted replaced
8230:00435a332502 8236:cc70da744f43
    28 
    28 
    29 class RenderAndSendNotificationView(hook.Operation):
    29 class RenderAndSendNotificationView(hook.Operation):
    30     """delay rendering of notification view until precommit"""
    30     """delay rendering of notification view until precommit"""
    31     view = None # make pylint happy
    31     view = None # make pylint happy
    32 
    32 
    33     def precommit_event(self):
    33     def postcommit_event(self):
    34         view = self.view
    34         view = self.view
    35         if view.cw_rset is not None and not view.cw_rset:
    35         if view.cw_rset is not None and not view.cw_rset:
    36             return # entity added and deleted in the same transaction (cache effect)
    36             return # entity added and deleted in the same transaction (cache effect)
    37         if view.cw_rset and self.session.deleted_in_transaction(view.cw_rset[view.cw_row or 0][view.cw_col or 0]):
    37         if view.cw_rset and self.session.deleted_in_transaction(view.cw_rset[view.cw_row or 0][view.cw_col or 0]):
    38             return # entity added and deleted in the same transaction
    38             return # entity added and deleted in the same transaction