Skip to content

Commit

Permalink
use group get api: handle empty usergroup
Browse files Browse the repository at this point in the history
  • Loading branch information
UlricQin committed Jul 22, 2021
1 parent 0f7a81f commit 24887cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion models/alert_rule_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 24887cc

Please sign in to comment.