Skip to content

Commit

Permalink
Updated the HourlyData model to allow null values
Browse files Browse the repository at this point in the history
  To deal with issues where the entire hour has error values
  • Loading branch information
caparker committed Aug 22, 2024
1 parent 7b84550 commit d4c05cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openaq_api/openaq_api/v3/models/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class License(JsonBase):
redistribution_allowed: bool
source_url: str


class Latest(JsonBase):
datetime: DatetimeObject
value: float
Expand Down Expand Up @@ -249,7 +249,7 @@ class Measurement(JsonBase):

class HourlyData(JsonBase):
#datetime: DatetimeObject
value: float
value: float | None = None # Nullable to deal with errors
parameter: ParameterBase
period: Period | None = None
coordinates: Coordinates | None = None
Expand Down

0 comments on commit d4c05cb

Please sign in to comment.