Skip to content

Commit

Permalink
[52] Update api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHeist committed Sep 8, 2024
1 parent 43b3fe6 commit d9d5b03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/routers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from os import environ

from fastapi import APIRouter, Depends, HTTPException, Request
from sqlalchemy import MetaData
from sqlalchemy import MetaData, text
from sqlalchemy.orm import Session

from app.database.session import engine
Expand Down Expand Up @@ -71,9 +71,9 @@ def health_check(
"""

try:
db.execute('SELECT 1')
db.execute(text('SELECT 1'))
except Exception as exc:
request.state.log.exception(f'Health check failed - {exc}')
getattr(request.state, 'log', log).exception(f'Health check failed - {exc}')
raise HTTPException(
status_code=500,
detail=f'Database returned some error - {exc}'
Expand Down
2 changes: 1 addition & 1 deletion modules/ref/version_webui
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0-alpha.12.0-webui51
v2.0-alpha.12.0-webui52

0 comments on commit d9d5b03

Please sign in to comment.