[entities] return the entity itself from notification_references if the view uses a random message-id
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 17 Feb 2015 12:42:42 +0100
changeset 10262 5c2a4a0a8dbd
parent 10261 b2f7f03f10b3
child 10263 7c4e090bc25f
[entities] return the entity itself from notification_references if the view uses a random message-id Useful for entity update notifications to reference the entity creation message.
entities/adapters.py
--- a/entities/adapters.py	Tue Feb 17 12:35:58 2015 +0100
+++ b/entities/adapters.py	Tue Feb 17 12:42:42 2015 +0100
@@ -78,6 +78,8 @@
         itree = self.entity.cw_adapt_to('ITree')
         if itree is not None:
             return itree.path()[:-1]
+        if view.msgid_timestamp:
+            return (self.entity.eid,)
         return ()