enhanced comment
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 09 May 2011 12:02:26 +0200
changeset 7336 0c8c386d653b
parent 7332 c3ae97c0066b
child 7338 591d6ed3e1f4
enhanced comment
hooks/metadata.py
--- a/hooks/metadata.py	Sat May 07 10:51:47 2011 +0200
+++ b/hooks/metadata.py	Mon May 09 12:02:26 2011 +0200
@@ -68,8 +68,9 @@
     def precommit_event(self):
         session = self.session
         relations = [(eid, session.user.eid) for eid in self.get_data()
-                # don't consider entities that have been created and
-                # deleted in the same transaction
+                # don't consider entities that have been created and deleted in
+                # the same transaction, nor ones where created_by has been
+                # explicitly set
                 if not session.deleted_in_transaction(eid) and \
                    not session.entity_from_eid(eid).created_by]
         session.add_relations([('created_by', relations)])