Fix lookup_location function

This commit is contained in:
projectmoon 2024-08-04 22:29:02 +02:00
parent 5b909353be
commit f5d08a1d1f
1 changed files with 5 additions and 1 deletions

6
osm.py
View File

@ -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. "