mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 15:44:52 +08:00
format group err msg
This commit is contained in:
parent
527c77b4a4
commit
6078639699
1 changed files with 1 additions and 5 deletions
|
@ -773,7 +773,7 @@ func IsGroupsValid(groups map[models.UserGroupID]struct{}) error {
|
||||||
for groupID := range groups {
|
for groupID := range groups {
|
||||||
_, err := GetUserGroup(groupID)
|
_, err := GetUserGroup(groupID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return fmt.Errorf("user group `%s` not found", groupID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -787,10 +787,6 @@ func IsNetworkRolesValid(networkRoles map[models.NetworkID]map[models.UserRoleID
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to fetch network %s ", netID)
|
return fmt.Errorf("failed to fetch network %s ", netID)
|
||||||
}
|
}
|
||||||
if len(netRoles) == 0 {
|
|
||||||
delete(networkRoles, netID)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for netRoleID := range netRoles {
|
for netRoleID := range netRoles {
|
||||||
role, err := logic.GetRole(netRoleID)
|
role, err := logic.GetRole(netRoleID)
|
||||||
|
|
Loading…
Add table
Reference in a new issue