[sobjects/notification] fix broken email notifications
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Thu, 09 Jan 2020 17:51:16 +0100
changeset 12843 000cd62eda32
parent 12842 e150ed316dfc
child 12844 ee2d77be950c
[sobjects/notification] fix broken email notifications In https://hg.logilab.org/review/cubicweb/rev/8caa109dfe945592a34904bb56971cc57d1c6084 EntityView.w become a method using EntityView._w In notifications we reset "self.w" for every notifications since we handle multiple streams. We should set "self._w" to None instead, otherwise subsequent calls to "self.w()" will fail with TypeError: 'NoneType' object is not callable.
cubicweb/sobjects/notification.py
--- a/cubicweb/sobjects/notification.py	Wed Dec 18 22:07:33 2019 +0100
+++ b/cubicweb/sobjects/notification.py	Thu Jan 09 17:51:16 2020 +0100
@@ -121,7 +121,7 @@
                 try:
                     # since the same view (eg self) may be called multiple time and we
                     # need a fresh stream at each iteration, reset it explicitly
-                    self.w = None
+                    self._w = None
                     try:
                         # XXX forcing the row & col here may make the content and
                         #     subject inconsistent because subject will depend on