Compare commits

..

No commits in common. "626be1c9fb787f154c0c6f2fd7810168805d8977" and "65068e44a5f37e367aa61c3019b3d0d3aec5abd2" have entirely different histories.

2 changed files with 8 additions and 2 deletions

View File

@ -19,7 +19,13 @@ pub async fn update(db: &SqlitePool, api_key: &str) -> Result<(), String> {
}; };
let max_temp = d.temp.max; let max_temp = d.temp.max;
let wind_gust = d.wind_gust; let wind_gust = d.wind_gust;
let rain_mm = d.rain.unwrap_or(0.); let Some(rain_mm) = d.rain else {
println!(
"Skipping weather import of {} as there's no rain prognosed",
date
);
continue;
};
Weather::create( Weather::create(
&mut tx, &mut tx,

View File

@ -101,7 +101,7 @@
</h2> </h2>
{% if day.weather %} {% if day.weather %}
<div class="bg-gray-300 rounded text-center"> <div class="bg-gray-300 rounded text-center">
Max temp: {{ day.weather.max_temp | round }}° &bullet; Windböe: {{ day.weather.wind_gust | round }} km/h &bullet; Regen: {{ day.weather.rain_mm | round }} mm Max temp: {{ day.weather.max_temp }}° &bullet; Windböe: {{ day.weather.wind_gust }} km/h &bullet; Regen: {{ day.weather.rain_mm }} mm
</div> </div>
{% endif %} {% endif %}
{% if day.planned_events | length > 0 or day.trips | length > 0 %} {% if day.planned_events | length > 0 or day.trips | length > 0 %}