sobjects/notification.py
branchstable
changeset 3045 82e0b12054a8
parent 3004 09ab5e93a02c
child 3051 2e28226e7de4
--- a/sobjects/notification.py	Thu Aug 27 13:01:17 2009 +0200
+++ b/sobjects/notification.py	Thu Aug 27 20:22:51 2009 +0200
@@ -56,7 +56,10 @@
 class RenderAndSendNotificationView(PreCommitOperation):
     """delay rendering of notification view until precommit"""
     def precommit_event(self):
-        if self.view.rset and self.view.rset[0][0] in self.session.transaction_data.get('pendingeids', ()):
+        view = self.view
+        if view.rset is not None and not view.rset:
+            return # entity added and deleted in the same transaction (cache effect)
+        if view.rset and view.rset[0][0] in self.session.transaction_data.get('pendingeids', ()):
             return # entity added and deleted in the same transaction
         self.view.render_and_send(**getattr(self, 'viewargs', {}))