From ee0db77982d38c9a374c13fec81f3c49e05b1859 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Thu, 14 Mar 2024 15:56:45 +0100 Subject: [PATCH] fix: orderLink parsing using updated templates metadata-mapping --- eodag/api/product/metadata_mapping.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eodag/api/product/metadata_mapping.py b/eodag/api/product/metadata_mapping.py index 3562d8a2e..c6de48653 100644 --- a/eodag/api/product/metadata_mapping.py +++ b/eodag/api/product/metadata_mapping.py @@ -54,6 +54,7 @@ DEFAULT_PROJ, deepcopy, dict_items_recursive_apply, + format_string, get_geometry_from_various, get_timestamp, items_recursive_apply, @@ -929,7 +930,7 @@ def properties_from_json( # Resolve templates for metadata, template in templates.items(): try: - properties[metadata] = template.format(**properties) + properties[metadata] = format_string(metadata, template, **properties) except ValueError: logger.warning( f"Could not parse {metadata} ({template}) using product properties"