Handle totals with no flights

This commit is contained in:
april
2024-01-09 13:17:34 -06:00
parent c45f47ed44
commit 955a3e38f3
2 changed files with 19 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ async def get_flight_totals(user: UserDisplaySchema = Depends(get_current_user),
end = datetime.strptime(end_date, "%Y-%m-%d") if end_date != "" else None
except (TypeError, ValueError):
raise HTTPException(400, "Date range not processable")
return await db.retrieve_totals(user.id, start, end)