fix: gender and previous state for DEMO
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user