diff --git a/src/endpoints/bettwaage.py b/src/endpoints/bettwaage.py index 51a1b60..db61e12 100644 --- a/src/endpoints/bettwaage.py +++ b/src/endpoints/bettwaage.py @@ -10,7 +10,7 @@ router = APIRouter() file_path = "bettwaage.csv" -latest_values = None +latest_values = [] zero_values = [0, 0, 0, 0] scale_values = [1, 1, 1, 1] @@ -91,7 +91,7 @@ async def delete_file(): @router.post("/zero", tags=["calibration"]) async def set_zero(): - if latest_values is None: + if not latest_values: return HTMLResponse( status_code=400, content="Requiring data before setting zeros." )