no rain level -> 0; round values
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user