mirror of https://github.com/portainer/portainer
fix(registries): update password only when not empty (#4669)
parent
f3c537ac2c
commit
832cafc933
|
@ -7,7 +7,7 @@ import (
|
|||
httperror "github.com/portainer/libhttp/error"
|
||||
"github.com/portainer/libhttp/request"
|
||||
"github.com/portainer/libhttp/response"
|
||||
"github.com/portainer/portainer/api"
|
||||
portainer "github.com/portainer/portainer/api"
|
||||
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
|
||||
}
|
||||
|
||||
if payload.Password != nil {
|
||||
if payload.Password != nil && *payload.Password != "" {
|
||||
registry.Password = *payload.Password
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue