Skip to content

Commit

Permalink
fix: allow legacy parameter names without prefix
Browse files Browse the repository at this point in the history
Temporary solution to not disrupt usages and give time to people to update their usage of the providers ECMWF-like.

add a deprecated mention for those legacy properties
  • Loading branch information
alambare committed Nov 29, 2024
1 parent 7721704 commit e013529
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eodag/plugins/search/build_search_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ def query(
if not product_type:
product_type = kwargs.get("productType", None)
self._preprocess_search_params(kwargs, product_type)

kwargs = {
"ecmwf:" + k if k in ECMWF_KEYWORDS + COP_DS_KEYWORDS else k: v
for k, v in kwargs.items()
}

result, num_items = super().query(prep, **kwargs)
if prep.count and not num_items:
num_items = 1
Expand Down

0 comments on commit e013529

Please sign in to comment.