Skip to content

Commit

Permalink
Handle calibrations command failure
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Aug 28, 2024
1 parent 5aec387 commit bcb3162
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lvmapi/routers/overwatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ async def route_get_calibrations_list() -> list[OverwatcherCalibrationModel]:
"calibrations list",
)

if calibrations_cmd.status.did_fail:
return []

calibrations = calibrations_cmd.replies.get("calibrations")

return [OverwatcherCalibrationModel(**calibration) for calibration in calibrations]
Expand Down

0 comments on commit bcb3162

Please sign in to comment.