From cc16b4a82696aed2f7ebd72745eafce47fecc23d Mon Sep 17 00:00:00 2001 From: James Date: Sat, 23 Nov 2024 22:22:32 -0500 Subject: [PATCH] support empty list --- .../elasticsearch/stac_fastapi/elasticsearch/database_logic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py index da6d6880..cd723cfb 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py @@ -168,7 +168,7 @@ def indices(collection_ids: Optional[List[str]]) -> str: Returns: A string of comma-separated index names. If `collection_ids` is None, returns the default indices. """ - if collection_ids is None: + if collection_ids is None or collection_ids == []: return ITEM_INDICES else: return ",".join([index_by_collection_id(c) for c in collection_ids])