use group get api: handle empty usergroup

This commit is contained in:
UlricQin 2021-07-22 23:34:06 +08:00
parent 0f7a81ff11
commit 24887cce83
1 changed files with 6 additions and 1 deletions

View File

@ -85,7 +85,12 @@ func (arg *AlertRuleGroup) FillUserGroups() error {
return internalServerError
}
arg.UserGroups = ugs
if len(ugs) > 0 {
arg.UserGroups = ugs
} else {
arg.UserGroups = []UserGroup{}
}
return nil
}