Add Rollback function to Trade

simplifies Session work
This commit is contained in:
Matthias
2022-08-06 15:08:13 +02:00
parent 45d68222a1
commit 5250189f77
5 changed files with 10 additions and 5 deletions

View File

@@ -70,7 +70,7 @@ def authorized_only(command_handler: Callable[..., None]) -> Callable[..., Any]:
)
return wrapper
# Rollback session to avoid getting data stored in a transaction.
Trade.query.session.rollback()
Trade.rollback()
logger.debug(
'Executing handler: %s for chat_id: %s',
command_handler.__name__,