fix(normalizer): handle None return from _parse_wfigs_incidents

When the non-WF filter returns None, the caller must check before
assigning to n[_kind]. Fixes TypeError on non-wildfire incidents.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt Johnson (via Claude) 2026-06-07 01:32:15 +00:00
commit 94118f7b6d

View file

@ -826,6 +826,8 @@ def normalize(envelope: dict) -> Optional[dict]:
} }
if category_raw.startswith("fire.incident"): if category_raw.startswith("fire.incident"):
n = _parse_wfigs_incidents(inner_data, geo) n = _parse_wfigs_incidents(inner_data, geo)
if n is None:
return None
n["_kind"] = "wfigs_incident" n["_kind"] = "wfigs_incident"
return n return n
if adapter == "wfigs_perimeters": if adapter == "wfigs_perimeters":