From: Sarah Hoffmann Date: Tue, 20 Jun 2023 09:33:35 +0000 (+0200) Subject: allow empty parts in excluded_place_id X-Git-Tag: v4.3.0~66^2~1 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/2f4342810d4bf1d12cb6064468ad8dcd9a7f62c3 allow empty parts in excluded_place_id This worked before. --- diff --git a/nominatim/api/types.py b/nominatim/api/types.py index c7e15843..aa3256cd 100644 --- a/nominatim/api/types.py +++ b/nominatim/api/types.py @@ -302,7 +302,8 @@ def format_excluded(ids: Any) -> List[int]: else: raise UsageError("Parameter 'excluded' needs to be a comma-separated list " "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.") return [int(id) for id in plist if id]