feat(gitops): general improvements BE-12919 (#2780)

This commit is contained in:
andres-portainer
2026-06-02 09:44:57 -03:00
committed by GitHub
parent 484af3c2c8
commit 1fa756372e
10 changed files with 190 additions and 124 deletions
@@ -91,8 +91,10 @@ func (h *Handler) gitSourceUpdate(w http.ResponseWriter, r *http.Request) *httpe
src.Name = updated.Name
src.GitConfig = updated.GitConfig
if payload.Authentication == nil && !payload.ClearAuthentication {
if payload.Authentication == nil {
src.GitConfig.Authentication = existingAuth
} else if *payload.Authentication == (GitAuthenticationPayload{}) {
src.GitConfig.Authentication = nil
}
return tx.Source().Update(src.ID, src)