From 374236713c9ed161b7c597b7e992f3999cf54b15 Mon Sep 17 00:00:00 2001 From: jakeross Date: Sat, 4 Jul 2026 09:38:06 -0600 Subject: [PATCH] Fix county-mode bbox crash in bbox_bounding_points An empty bbox string (the default when scoping by county) hit the str branch and raised ValueError on "".split(","), so WQP and NWIS silently returned no sites for any county-scoped run. Guard the str branch on a non-empty value so an empty bbox falls through to deriving bounds from the county/wkt polygon. Co-Authored-By: Claude Opus 4.8 --- backend/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/config.py b/backend/config.py index 7380c24..3ef4323 100644 --- a/backend/config.py +++ b/backend/config.py @@ -328,7 +328,7 @@ def bbox_bounding_points(self, bbox=None): if bbox is None: bbox = self.bbox - if isinstance(bbox, str): + if isinstance(bbox, str) and bbox.strip(): p1, p2 = bbox.split(",") x1, y1 = [float(a) for a in p1.strip().split(" ")] x2, y2 = [float(a) for a in p2.strip().split(" ")]