mirror of
https://github.com/portainer/portainer.git
synced 2025-07-28 09:49:40 +02:00
fix(registries): update password only when not empty (#4669)
This commit is contained in:
parent
f3c537ac2c
commit
832cafc933
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer/api"
|
portainer "github.com/portainer/portainer/api"
|
||||||
bolterrors "github.com/portainer/portainer/api/bolt/errors"
|
bolterrors "github.com/portainer/portainer/api/bolt/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ func (handler *Handler) registryUpdate(w http.ResponseWriter, r *http.Request) *
|
||||||
registry.Username = *payload.Username
|
registry.Username = *payload.Username
|
||||||
}
|
}
|
||||||
|
|
||||||
if payload.Password != nil {
|
if payload.Password != nil && *payload.Password != "" {
|
||||||
registry.Password = *payload.Password
|
registry.Password = *payload.Password
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue