diff --git a/gallery/easel/route/view/weather/templates/weather.html b/gallery/easel/route/view/weather/templates/weather.html index f64615f..509e39c 100644 --- a/gallery/easel/route/view/weather/templates/weather.html +++ b/gallery/easel/route/view/weather/templates/weather.html @@ -173,7 +173,7 @@ {% for value in response.values %} - {{value.humidity}} + {% if value.humidity > -1%}{{value.humidity}}{% endif %} {% endfor %} diff --git a/gallery/sketch/weather/model.py b/gallery/sketch/weather/model.py index da49b17..08d05fb 100644 --- a/gallery/sketch/weather/model.py +++ b/gallery/sketch/weather/model.py @@ -2,7 +2,7 @@ import datetime from enum import StrEnum, auto from typing import Self -from pydantic import BaseModel +from pydantic import BaseModel, Field class Model(BaseModel): @@ -116,8 +116,8 @@ class WeatherValue(Model): wind_gust: int wind_direction: float precipitation: float - pressure: list[int] - humidity: int + pressure: list[int] = Field(default=[]) + humidity: int = Field(default=-1) class WeatherResponse(Model):