hooks/metadata.py
changeset 7336 0c8c386d653b
parent 7237 9f619715665b
child 7399 972ed1843bd8
--- 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)])