From b846c8e6d202f320281b8c9a16145b4eddb5f39d Mon Sep 17 00:00:00 2001 From: sunportainer <93502624+sunportainer@users.noreply.github.com> Date: Mon, 28 Mar 2022 21:31:03 +0800 Subject: [PATCH] fix(stack): git stack redeploy issue EE-2737 (#6667) * fix(stack) git stack redeploy issue --- .../stack-redeploy-git-form.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js index 7aa527f03..1a3092b7c 100644 --- a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js +++ b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js @@ -95,13 +95,13 @@ class StackRedeployGitFormController { ''; const template = angular.element(tplCrop); const html = this.$compile(template)(this.$scope); - this.ModalService.confirmStackUpdate(html, true, true, 'btn-warning', function (result) { + this.ModalService.confirmStackUpdate(html, true, true, 'btn-warning', async (result) => { if (!result) { return; } try { this.state.redeployInProgress = true; - this.StackService.updateGit(this.stack.Id, this.stack.EndpointId, this.FormHelper.removeInvalidEnvVars(this.formValues.Env), false, this.formValues); + await this.StackService.updateGit(this.stack.Id, this.stack.EndpointId, this.FormHelper.removeInvalidEnvVars(this.formValues.Env), false, this.formValues); this.Notifications.success('Pulled and redeployed stack successfully'); this.$state.reload(); } catch (err) {