diff --git a/geo_alarm.py b/geo_alarm.py index 138248b..83b38da 100644 --- a/geo_alarm.py +++ b/geo_alarm.py @@ -120,9 +120,13 @@ def load_nowcast_geo_alarm_filter(path: Path) -> dict[str, Any]: if not isinstance(lightning, dict): raise ConfigurationError("filter.lightning JSON nesnesi olmalıdır.") event_type = lightning.get("type") - if event_type not in {"FLASH_CLOUD_TO_GROUND", "PULSE_IN_CLOUD"}: + if event_type is not None and event_type not in { + "FLASH_CLOUD_TO_GROUND", + "PULSE_IN_CLOUD", + }: raise ConfigurationError( - "filter.lightning.type FLASH_CLOUD_TO_GROUND veya PULSE_IN_CLOUD olmalıdır." + "filter.lightning.type belirtilirse FLASH_CLOUD_TO_GROUND veya " + "PULSE_IN_CLOUD olmalıdır." ) thunderstorm = config.get("thunderstorm")