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