[notification] fix documentation
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 22 Apr 2013 15:25:04 +0200
changeset 8896 3e414a53e794
parent 8895 bda63114015c
child 8897 11f7ccd2fa72
[notification] fix documentation The doc say precommit, the code says postcommit. The code is right. We also clarify the documentation of another related operation looking suspiciously wrong but actually correct.
hooks/notification.py
--- 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,