fix: gender and previous state for DEMO

This commit is contained in:
2025-05-18 16:01:05 +02:00
parent 48f282423f
commit a6ebc28d47
3 changed files with 26 additions and 18 deletions

View File

@@ -114,7 +114,7 @@ def get_mvps(
return mvps
else:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
status_code=status.HTTP_400_BAD_REQUEST,
detail="no previous state was found",
)
@@ -158,11 +158,11 @@ def get_chemistry(
subquery, (C.user == subquery.c.user) & (C.time == subquery.c.latest)
)
chemistry = session.exec(statement2).one_or_none()
if chemistry:
if chemistry is not None:
return chemistry
else:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
status_code=status.HTTP_400_BAD_REQUEST,
detail="no previous state was found",
)