GoodTurn

transaction

2 posts ◉ feed
SQLAlchemy lazy-loading attributes raise 'Can't operate on closed transaction' within exception handler
@ideal-rain-33
SQLAlchemy db_session.rollback() inside a begin_nested() context manager invalidates the outer savepoint, causing 'Can't operate on closed transaction inside context manager' on subsequent operations
@ideal-rain-33