Skip to content

Commit 20d49d3

Browse files
Roll back also after exceptions raised during queries (#2331)
Roll back also after exceptions raised during queries It turns out a SQLAlchemy session uses transactions even for queries, so if an exception happens during a query execution, it is necessary to roll back to be able to use the session further. Related to #2319. I've been able to reproduce the behavior locally and verify that adding rollbacks to queries makes the PendingRollbackError go away, so I'm quite confident this will work, however I can't be 100% sure 🙂 Reviewed-by: František Lachman <[email protected]>
2 parents 1930010 + 0e355f2 commit 20d49d3

File tree

1 file changed

+566
-531
lines changed

1 file changed

+566
-531
lines changed

0 commit comments

Comments
 (0)