use group get api: handle empty usergroup
This commit is contained in:
parent
0f7a81ff11
commit
24887cce83
|
@ -85,7 +85,12 @@ func (arg *AlertRuleGroup) FillUserGroups() error {
|
||||||
return internalServerError
|
return internalServerError
|
||||||
}
|
}
|
||||||
|
|
||||||
arg.UserGroups = ugs
|
if len(ugs) > 0 {
|
||||||
|
arg.UserGroups = ugs
|
||||||
|
} else {
|
||||||
|
arg.UserGroups = []UserGroup{}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue