From 004c86578de09564d2ae60f21bf0a0dcf5069ef5 Mon Sep 17 00:00:00 2001 From: cmeng Date: Fri, 4 Aug 2023 15:17:51 +1200 Subject: [PATCH] fix(edge-stack): detaching from git repository EE-5812 (#9988) --- api/http/handler/stacks/stack_update.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/http/handler/stacks/stack_update.go b/api/http/handler/stacks/stack_update.go index 528d62864..05c0c9150 100644 --- a/api/http/handler/stacks/stack_update.go +++ b/api/http/handler/stacks/stack_update.go @@ -198,6 +198,11 @@ func (handler *Handler) updateComposeStack(r *http.Request, stack *portainer.Sta stack.Env = payload.Env + if stack.GitConfig != nil { + // detach from git + stack.GitConfig = nil + } + stackFolder := strconv.Itoa(int(stack.ID)) _, err = handler.FileService.UpdateStoreStackFileFromBytes(stackFolder, stack.EntryPoint, []byte(payload.StackFileContent)) if err != nil {