equal
deleted
inserted
replaced
74 """return the state of the entity with the given eid, |
74 """return the state of the entity with the given eid, |
75 usually since it's changing in the current transaction. Due to internal |
75 usually since it's changing in the current transaction. Due to internal |
76 relation hooks, the relation may has been deleted at this point, so |
76 relation hooks, the relation may has been deleted at this point, so |
77 we have handle that |
77 we have handle that |
78 """ |
78 """ |
|
79 if eid in session.transaction_data.get('neweids', ()): |
|
80 return |
79 pending = session.transaction_data.get('pendingrelations', ()) |
81 pending = session.transaction_data.get('pendingrelations', ()) |
80 for eidfrom, rtype, eidto in reversed(pending): |
82 for eidfrom, rtype, eidto in reversed(pending): |
81 if rtype == 'in_state' and eidfrom == eid: |
83 if rtype == 'in_state' and eidfrom == eid: |
82 rset = session.execute('Any S,N WHERE S eid %(x)s, S name N', |
84 rset = session.execute('Any S,N WHERE S eid %(x)s, S name N', |
83 {'x': eidto}, 'x') |
85 {'x': eidto}, 'x') |