Skip to content

Commit 30072fc

Browse files
committed
faster breakpoint
Signed-off-by: John Seekins <[email protected]>
1 parent 601198f commit 30072fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

enrichers/openstreetmap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ def search(self) -> dict:
6565
logger.debug(" OSM search error for '%s': %s", facility_name, e)
6666
self.resp_info["search_query_steps"].append(f"(Failed -> {e})") # type: ignore [attr-defined]
6767
continue
68+
if not data:
69+
return self.resp_info
6870
# when the URL result is a "way" this is usually correct.
6971
# checks top five results.
7072
match_terms = ["prison", "detention", "correctional", "jail"]
@@ -84,8 +86,6 @@ def search(self) -> dict:
8486
self.resp_info["details"]["longitude"] = lon # type: ignore [index]
8587
self.resp_info["title"] = title
8688
return self.resp_info
87-
if not data:
88-
return self.resp_info
8989
# fallback to first result
9090
first_result = data[0]
9191
logger.debug("Address searches didn't directly find anything, just using the first result: %s", first_result)

0 commit comments

Comments
 (0)