# HG changeset patch # User Sylvain Thénault # Date 1250503960 -7200 # Node ID b6993462ddb96ab4caee3d3305567bf1c6963b72 # Parent b7399ef8b3e050b03799fc3adae9e362dff9397a [wf] shouldn't check for neweids while trying to get previous state (detected by forge tests) diff -r b7399ef8b3e0 -r b6993462ddb9 server/hookhelper.py --- 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: