Skip to content

Commit

Permalink
ensure requests is a list
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Dec 20, 2024
1 parent 8161506 commit bd8dc5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cads_adaptors/adaptors/mars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit bd8dc5d

Please sign in to comment.