You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
0 commit comments