From 22b4d029fdc95cbda73647f232805419b608010a Mon Sep 17 00:00:00 2001 From: Oscar Zhou <100548325+oscarzhou-portainer@users.noreply.github.com> Date: Mon, 19 Feb 2024 08:39:16 +1300 Subject: [PATCH] fix(edge/template): custom template git fields not pre-filled [EE-6695] (#11113) --- .../create-edge-stack-view.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/edge/views/edge-stacks/createEdgeStackView/create-edge-stack-view.controller.js b/app/edge/views/edge-stacks/createEdgeStackView/create-edge-stack-view.controller.js index a3969ae35..f8293cfd3 100644 --- a/app/edge/views/edge-stacks/createEdgeStackView/create-edge-stack-view.controller.js +++ b/app/edge/views/edge-stacks/createEdgeStackView/create-edge-stack-view.controller.js @@ -105,9 +105,6 @@ export default class CreateEdgeStackViewController { } if (type === 'custom') { - const fileContent = await getCustomTemplateFile({ id: template.Id, git: !!template.GitConfig }); - this.state.templateValues.file = fileContent; - this.formValues = { ...this.formValues, DeploymentType: template.Type === StackType.Kubernetes ? DeploymentType.Kubernetes : DeploymentType.Compose, @@ -121,6 +118,9 @@ export default class CreateEdgeStackViewController { } : {}), }; + + const fileContent = await getCustomTemplateFile({ id: template.Id, git: !!template.GitConfig }); + this.state.templateValues.file = fileContent; } if (type === 'app') {