hooks/notification.py
branchstable
changeset 8227 884405bf3621
parent 7879 9aae456abab5
child 8236 cc70da744f43
equal deleted inserted replaced
8226:a3d3bdd46463 8227:884405bf3621
    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