Fixed data missing case
This commit is contained in:
parent
368052f713
commit
10255b966b
1 changed files with 2 additions and 2 deletions
|
@ -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."
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue