Skip to content

Commit

Permalink
Fix styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
louise-davies committed Feb 4, 2021
1 parent 38dc28e commit 9d3ddc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datagateway_api/common/database/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from functools import wraps
import logging

from sqlalchemy.orm import aliased
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.orm import aliased

from datagateway_api.common.database.filters import (
DatabaseIncludeFilter as IncludeFilter,
Expand All @@ -30,6 +30,7 @@

db = SQLAlchemy()


def requires_session_id(method):
"""
Decorator for database backend methods that makes sure a valid session_id is
Expand Down Expand Up @@ -89,7 +90,7 @@ def commit_changes(self):
try:
self.session.commit()
except Exception as e:
log.error(f"Error whilst committing changes to {self.table}, rolling back")
log.error("Error whilst committing changes to %s, rolling back", self.table)
self.session.rollback()
raise e

Expand Down

0 comments on commit 9d3ddc6

Please sign in to comment.