code refactor

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

View File

@ -76,6 +76,7 @@ func (arg *AlertRuleGroup) Update(cols ...string) error {
func (arg *AlertRuleGroup) FillUserGroups() error {
ids := strings.Fields(arg.UserGroupIds)
if len(ids) == 0 {
arg.UserGroups = []UserGroup{}
return nil
}