summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorAnts Aasma <ants.aasma@gmail.com>2008-02-06 17:38:29 +0000
committerAnts Aasma <ants.aasma@gmail.com>2008-02-06 17:38:29 +0000
commit45064259664196c6e074cfb76366abe45d80c0fb (patch)
tree95c679e39797e5bc3b7ca9086cdbcc81e0d66321 /lib/sqlalchemy
parent56410e3158f039a46316873c8cc221676b86bce5 (diff)
downloadsqlalchemy-45064259664196c6e074cfb76366abe45d80c0fb.tar.gz
unit-of-work flush didn't close the failed transaction when the session was not in a transaction and commiting the transaction failed.
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/unitofwork.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py
index 05c9388b3..6c9e989b0 100644
--- a/lib/sqlalchemy/orm/unitofwork.py
+++ b/lib/sqlalchemy/orm/unitofwork.py
@@ -216,10 +216,10 @@ class UnitOfWork(object):
if session.extension is not None:
session.extension.after_flush(session, flush_context)
+ session.commit()
except:
session.rollback()
raise
- session.commit()
flush_context.post_exec()