mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 09:24:44 +02:00
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:
parent
69ccbc035a
commit
94118f7b6d
1 changed files with 2 additions and 0 deletions
|
|
@ -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":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue