equal
deleted
inserted
replaced
16 |
16 |
17 class RenderAndSendNotificationView(hook.Operation): |
17 class RenderAndSendNotificationView(hook.Operation): |
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.rset is not None and not view.rset: |
|
22 return # entity added and deleted in the same transaction (cache effect) |
21 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[cw_rset.cw_row or 0][cw_rset.cw_col or 0]): |
22 return # entity added and deleted in the same transaction |
24 return # entity added and deleted in the same transaction |
23 self.view.render_and_send(**getattr(self, 'viewargs', {})) |
25 self.view.render_and_send(**getattr(self, 'viewargs', {})) |
24 |
26 |
25 |
27 |