1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

chore(nil): remove unnecessary nil checks EE-4847 (#8254)

This commit is contained in:
andres-portainer 2022-12-30 15:26:46 -03:00 committed by GitHub
parent e529327851
commit 137ce37096
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 18 deletions

View file

@ -27,7 +27,7 @@ func (payload *updateEdgeStackPayload) Validate(r *http.Request) error {
if payload.StackFileContent == "" {
return errors.New("Invalid stack file content")
}
if payload.EdgeGroups != nil && len(payload.EdgeGroups) == 0 {
if len(payload.EdgeGroups) == 0 {
return errors.New("Edge Groups are mandatory for an Edge stack")
}
return nil