no rain level -> 0; round values
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m17s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2024-05-16 16:35:49 +02:00
parent 133a517a2e
commit 7e2c185c03
2 changed files with 2 additions and 8 deletions

View File

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