From bd8dc5d72a77cdb1d5f9926c5d254ad7bf0528cc Mon Sep 17 00:00:00 2001 From: malmans2 Date: Fri, 20 Dec 2024 13:28:07 +0100 Subject: [PATCH] ensure requests is a list --- cads_adaptors/adaptors/mars.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cads_adaptors/adaptors/mars.py b/cads_adaptors/adaptors/mars.py index ab4189bc..b0cbbc25 100644 --- a/cads_adaptors/adaptors/mars.py +++ b/cads_adaptors/adaptors/mars.py @@ -211,6 +211,7 @@ def retrieve_list_of_results(self, request: dict[str, Any]) -> list[str]: # Call normalise_request to set self.mapped_requests request = self.normalise_request(request) + requests = ensure_list(self.mapped_requests) cached_execute_mars = CachedExecuteMars( context=self.context, @@ -221,7 +222,7 @@ def retrieve_list_of_results(self, request: dict[str, Any]) -> list[str]: with cacholote.config.set( return_cache_entry=False # TODO: use_cache=self.local_staging ): - result = cached_execute_mars.retrieve(self.mapped_requests).name + result = cached_execute_mars.retrieve(requests).name with dask.config.set(scheduler="threads"): result = self.post_process(result)