remove error log from dao_utils

we don't need it here - as exceptions are re-raised, they will be logged
additionally by error handlers further up. All this exception logger
tells us is that service names are already in use, which isn't something
we're really interested in.
This commit is contained in:
Leo Hemsted
2020-02-20 11:48:41 +00:00
parent f7f6be56c7
commit 11fb9da32c

View File

@@ -8,13 +8,11 @@ from app.history_meta import create_history
def transactional(func):
@wraps(func)
def commit_or_rollback(*args, **kwargs):
from flask import current_app
try:
res = func(*args, **kwargs)
db.session.commit()
return res
except Exception as e:
current_app.logger.error(e)
except Exception:
db.session.rollback()
raise
return commit_or_rollback