PR review

This commit is contained in:
Dominique Lasserre
2025-01-19 14:54:15 +01:00
parent 437d38f508
commit e0b1ece524
6 changed files with 14 additions and 10 deletions

View File

@@ -63,11 +63,11 @@ class WeatherImport(WeatherProvider, PredictionImportProvider):
return "WeatherImport"
def _update_data(self, force_update: Optional[bool] = False) -> None:
if self.config.weather.provider_settings.import_file_path is not None:
if self.config.weather.provider_settings.import_file_path:
self.import_from_file(
self.config.weather.provider_settings.import_file_path, key_prefix="weather"
)
if self.config.weather.provider_settings.import_json is not None:
if self.config.weather.provider_settings.import_json:
self.import_from_json(
self.config.weather.provider_settings.import_json, key_prefix="weather"
)