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

This commit is contained in:
voussoir 2020-09-17 18:33:56 -07:00
parent 4c9668c920
commit 26b9371f26

View file

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