Cizz22 2 months ago
parent 6293b8ba48
commit 8459a49e34

@ -2,7 +2,9 @@ from typing import List, Optional, Union
from fastapi import APIRouter
from fastapi.params import Query
import requests
from src import config
from src.auth.service import CurrentUser, InternalKey, Token
from src.config import DEFAULT_TC_ID
from src.database.core import DbSession
@ -94,6 +96,10 @@ async def get_calculation_results(db_session: DbSession, calculation_id, token:I
db_session=db_session, calculation_id=calculation_id, token=token, include_risk_cost=include_risk_cost
)
requests.post(f"{config.AUTH_SERVICE_API}/sign-out", headers={
"Authorization": f"Bearer {token}"
})
return StandardResponse(
data=results,
message="Data retrieved successfully",

@ -161,7 +161,7 @@ async def get_overview_overhaul(*, db_session: DbSession):
)
)
ongoing_result = await db_session.execute(ongoing_query.options(selectinload(OverhaulScope.maintenance_type)))
ongoing_overhaul = ongoing_result.first()
ongoing_overhaul = ongoing_result.scalar_one_or_none()
# 2. If no ongoing overhaul, get the closest scheduled overhaul
if ongoing_overhaul is None:

Loading…
Cancel
Save