diff --git a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py index 4cd6e046..2da2bbaf 100644 --- a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py +++ b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py @@ -183,7 +183,9 @@ def command( # noqa: C901 if not response.ok: response.raise_for_status() - config_ref = response.json()["id"] + target_deployer = deployer + if (not deployer) and len(deployer_record.names): + target_deployer = deployer_record.names[0] deployment_request = { "record": { @@ -191,7 +193,7 @@ def command( # noqa: C901 "application": app, "version": "1.0.0", "name": f"{app_record.attributes.name}@{app_record.attributes.version}", - "deployer": deployer, + "deployer": target_deployer, "meta": {"when": str(datetime.utcnow())}, } }