Skip to content
Snippets Groups Projects
Commit c954e6ac authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Fix: Handling that weather data are WeatherObservation instances

parent d6cb821d
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,10 @@ def get_weather_observations_from_json_list(weather_data: list) -> list:
"""
retval = []
for node in weather_data:
retval.append(WeatherObservation(**node))
if isinstance(node, WeatherObservation):
retval.append(node)
else:
retval.append(WeatherObservation(**node))
return retval
def get_temp_adjusted_for_base(temp: float, base_temp = 0.0) -> float:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment