From f5d08a1d1fedad0809b23816165f910d2a3e1af2 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Sun, 4 Aug 2024 22:29:02 +0200 Subject: [PATCH] Fix lookup_location function --- osm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osm.py b/osm.py index 6171013..b34519b 100644 --- a/osm.py +++ b/osm.py @@ -272,7 +272,11 @@ class Tools: """ searcher = OsmSearcher(self.valves) try: - return searcher.nominatim_search(address_or_place) + result = searcher.nominatim_search(address_or_place) + if result: + return str(result) + else: + return NO_RESULTS except Exception as e: print(e) return (f"There are no results due to an error. "