From 55e179658b917ad324e7f7053d7de396e245b80f Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Thu, 13 Feb 2025 17:44:32 -0500 Subject: [PATCH] Allow None value for storm coordinates --- lib/nexrad/storm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nexrad/storm.py b/lib/nexrad/storm.py index 6ee6488..e83ae9a 100644 --- a/lib/nexrad/storm.py +++ b/lib/nexrad/storm.py @@ -76,10 +76,10 @@ def timezone_from_str(text: str) -> datetime.timezone: return datetime.UTC if tz is None else tz def coord_from_str(text_lon: str, text_lat: str): - lon = 0.0 if text_lon == '' else float(text_lon) - lat = 0.0 if text_lat == '' else float(text_lat) + if text_lon == '' or text_lat == '': + return - return Coord(lon, lat) + return Coord(float(text_lon), float(text_lat)) class StormReport(DatabaseTable): __slots__ = (