From 27cfb692f48023aa86338a45cbdefef9b387c95e Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Sun, 6 Jun 2021 12:57:44 +0300 Subject: [PATCH] feat(stacks): set stopped stacks status to activate when updating --- api/http/handler/stacks/stack_update.go | 1 + api/http/handler/stacks/stack_update_git.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/api/http/handler/stacks/stack_update.go b/api/http/handler/stacks/stack_update.go index ea012382a..34c64129c 100644 --- a/api/http/handler/stacks/stack_update.go +++ b/api/http/handler/stacks/stack_update.go @@ -191,6 +191,7 @@ func (handler *Handler) updateSwarmStack(r *http.Request, stack *portainer.Stack stack.UpdateDate = time.Now().Unix() stack.UpdatedBy = config.user.Username + stack.Status = portainer.StackStatusActive err = handler.deploySwarmStack(config) if err != nil { diff --git a/api/http/handler/stacks/stack_update_git.go b/api/http/handler/stacks/stack_update_git.go index 8715686c9..00f3b6cf2 100644 --- a/api/http/handler/stacks/stack_update_git.go +++ b/api/http/handler/stacks/stack_update_git.go @@ -138,6 +138,7 @@ func (handler *Handler) deployStack(r *http.Request, stack *portainer.Stack, end stack.UpdateDate = time.Now().Unix() stack.UpdatedBy = config.user.Username + stack.Status = portainer.StackStatusActive return nil } @@ -154,6 +155,7 @@ func (handler *Handler) deployStack(r *http.Request, stack *portainer.Stack, end stack.UpdateDate = time.Now().Unix() stack.UpdatedBy = config.user.Username + stack.Status = portainer.StackStatusActive return nil }