diff --git a/cads_processing_api_service/adaptors.py b/cads_processing_api_service/adaptors.py index 8adbaf3b..6be50242 100644 --- a/cads_processing_api_service/adaptors.py +++ b/cads_processing_api_service/adaptors.py @@ -64,9 +64,8 @@ def make_system_request( except AttributeError: entry_point = FALLBACK_ENTRY_POINT - try: - config = resource.config - except AttributeError: + config = resource.adaptor_configuration + if config is None: config = FALLBACK_CONFIG.copy() config["collection_id"] = process_id diff --git a/tests/test_20_adaptors.py b/tests/test_20_adaptors.py index c6949f56..0fbdaa25 100644 --- a/tests/test_20_adaptors.py +++ b/tests/test_20_adaptors.py @@ -26,7 +26,10 @@ def test_make_system_request_default() -> None: exp_setup_code = adaptors.FALLBACK_SETUP_CODE exp_entry_point = adaptors.FALLBACK_ENTRY_POINT - exp_kwargs = {"request": inputs, "config": adaptors.FALLBACK_CONFIG} + exp_kwargs = { + "request": inputs, + "config": adaptors.FALLBACK_CONFIG | {"collection_id": process_id}, + } exp_metadata = {"X-Forward-Process-ID": process_id} request = adaptors.make_system_request(process_id, execution_content, resource)