server/hookhelper.py
branchstable
changeset 2876 b6993462ddb9
parent 2647 b0a2e779845c
child 2880 bfc8e1831290
child 3869 ec6463886ac4
--- a/server/hookhelper.py	Mon Aug 17 12:11:54 2009 +0200
+++ b/server/hookhelper.py	Mon Aug 17 12:12:40 2009 +0200
@@ -74,8 +74,9 @@
     relation hooks, the relation may has been deleted at this point, so
     we have handle that
     """
-    if eid in session.transaction_data.get('neweids', ()):
-        return
+    # don't check eid in session.transaction_data.get('neweids', ()), we don't
+    # want to miss previous state of entity whose state change in the same
+    # transaction as it's being created
     pending = session.transaction_data.get('pendingrelations', ())
     for eidfrom, rtype, eidto in reversed(pending):
         if rtype == 'in_state' and eidfrom == eid: