From cb263d31e5fd46c9f5d1f2ed220957f969bf66f7 Mon Sep 17 00:00:00 2001 From: Concetta Date: Wed, 10 Apr 2024 15:38:59 +0200 Subject: [PATCH] Expose costing information --- cads_catalogue_api_service/client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cads_catalogue_api_service/client.py b/cads_catalogue_api_service/client.py index d6cb33d..2f54a19 100644 --- a/cads_catalogue_api_service/client.py +++ b/cads_catalogue_api_service/client.py @@ -231,6 +231,18 @@ def generate_collection_links( } ) + if "costing" in model.resource_data.adaptor_configuration: + additional_links.append( + { + "rel": "costing_api", + "href": urllib.parse.urljoin( + config.settings.processes_base_url, + f"processes/{model.resource_uid}/costing", + ), + "type": "application/json", + } + ) + if model.layout: additional_links.append( {