format group err msg

This commit is contained in:
abhishek9686 2024-08-12 08:10:26 +05:30
parent 527c77b4a4
commit 6078639699

View file

@ -773,7 +773,7 @@ func IsGroupsValid(groups map[models.UserGroupID]struct{}) error {
for groupID := range groups {
_, err := GetUserGroup(groupID)
if err != nil {
return err
return fmt.Errorf("user group `%s` not found", groupID)
}
}
return nil
@ -787,10 +787,6 @@ func IsNetworkRolesValid(networkRoles map[models.NetworkID]map[models.UserRoleID
if err != nil {
return fmt.Errorf("failed to fetch network %s ", netID)
}
if len(netRoles) == 0 {
delete(networkRoles, netID)
continue
}
}
for netRoleID := range netRoles {
role, err := logic.GetRole(netRoleID)