mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
allow empty parts in excluded_place_id
This worked before.
This commit is contained in:
@@ -302,7 +302,8 @@ def format_excluded(ids: Any) -> List[int]:
|
|||||||
else:
|
else:
|
||||||
raise UsageError("Parameter 'excluded' needs to be a comma-separated list "
|
raise UsageError("Parameter 'excluded' needs to be a comma-separated list "
|
||||||
"or a Python list of numbers.")
|
"or a Python list of numbers.")
|
||||||
if not all(isinstance(i, int) or (isinstance(i, str) and i.isdigit()) for i in plist):
|
if not all(isinstance(i, int) or
|
||||||
|
(isinstance(i, str) and (not i or i.isdigit())) for i in plist):
|
||||||
raise UsageError("Parameter 'excluded' only takes place IDs.")
|
raise UsageError("Parameter 'excluded' only takes place IDs.")
|
||||||
|
|
||||||
return [int(id) for id in plist if id]
|
return [int(id) for id in plist if id]
|
||||||
|
|||||||
Reference in New Issue
Block a user