When @transaction rolls back, log the name of the called method.

master
voussoir 2020-09-17 18:33:56 -07:00
parent 4c9668c920
commit 26b9371f26
1 changed files with 2 additions and 2 deletions

View File

@ -86,8 +86,8 @@ def transaction(method):
try:
result = method(self, *args, **kwargs)
except Exception as e:
photodb.log.debug(e)
except Exception as exc:
photodb.log.debug(f'{method} raised {repr(exc)}')
photodb.rollback(savepoint=savepoint_id)
raise