Skip to content

Commit

Permalink
fix mpsas from being bool
Browse files Browse the repository at this point in the history
  • Loading branch information
nonnontrivial committed Jun 16, 2024
1 parent 421f986 commit 6160f68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pp/pp/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ async def get_prediction_message_for_lat_lon(client: httpx.AsyncClient, lat: flo
res.raise_for_status()

data = res.json()
if mpsas := data.get("sky_brightness", None) is None:
raise ValueError("no sky brightness reading in response")
if (mpsas := data.get("sky_brightness", None)) is None:
raise ValueError("no sky brightness reading in api response")

return PredictionMessage(
lat=lat,
Expand Down

0 comments on commit 6160f68

Please sign in to comment.