hooks/notification.py
changeset 8896 3e414a53e794
parent 8236 cc70da744f43
child 8898 c570d15dce7b
--- a/hooks/notification.py	Tue Apr 23 12:01:14 2013 +0200
+++ b/hooks/notification.py	Mon Apr 22 15:25:04 2013 +0200
@@ -27,7 +27,7 @@
 from cubicweb.sobjects.supervising import SupervisionMailOp
 
 class RenderAndSendNotificationView(hook.Operation):
-    """delay rendering of notification view until precommit"""
+    """delay rendering of notification view until postcommit"""
     view = None # make pylint happy
 
     def postcommit_event(self):
@@ -110,8 +110,10 @@
 
 
 class EntityUpdatedNotificationOp(hook.SingleLastOperation):
+    """scrap all changed entity to prepare a Notification Operation for them"""
 
     def precommit_event(self):
+        # precommit event that creates postcommit operation
         session = self.session
         for eid in session.transaction_data['changes']:
             view = session.vreg['views'].select('notif_entity_updated', session,