Merge "Flush objects by ourselves before processing before_commit event"
This commit is contained in:
commit
83ecf60999
@ -278,7 +278,10 @@ def load_one_to_manys(session):
|
||||
# have eliminated all places where related objects are constructed
|
||||
# using a key rather than a relationship.
|
||||
|
||||
add_to_rel_load_list(session) # capture any new objects
|
||||
# capture any new objects
|
||||
if session.new:
|
||||
session.flush()
|
||||
|
||||
if session.transaction.nested:
|
||||
# wait until final commit
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user