From 2f4342810d4bf1d12cb6064468ad8dcd9a7f62c3 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 20 Jun 2023 11:33:35 +0200 Subject: [PATCH] allow empty parts in excluded_place_id This worked before. --- nominatim/api/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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] -- 2.39.5