Skip to content

Commit

Permalink
fix: API healthcheck (#272)
Browse files Browse the repository at this point in the history
Update the API's healthcheck to work with SQLAlchemy 2.0.
  • Loading branch information
patheard authored Oct 12, 2023
1 parent 997dfd0 commit 2ee505f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/api_gateway/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from sqlalchemy.exc import SQLAlchemyError, NoResultFound
from sqlalchemy.sql.expression import func, cast
from sqlalchemy.orm import Session
from sqlalchemy import String
from sqlalchemy import String, text
from database.db import db_session
from logger import log

Expand Down Expand Up @@ -105,7 +105,7 @@ def version():


def get_db_version(session):
query = "SELECT version_num FROM alembic_version"
query = text("SELECT version_num FROM alembic_version")
full_name = session.execute(query).fetchone()[0]
return full_name

Expand Down

0 comments on commit 2ee505f

Please sign in to comment.