Skip to content

Commit

Permalink
fix: notification silence validation
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Nov 8, 2024
1 parent f1ac4af commit 47f1622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notification/silence.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func (t *SilenceSaveRequest) Validate() error {
return errors.New("`from` time must be before `until")
}

if t.NotificationSilenceResource.Empty() {
return errors.New("at least one of `config_id`, `canary_id`, `check_id` or `component_id` is required")
if t.NotificationSilenceResource.Empty() && t.Filter == "" {
return errors.New("at least one of config_id, canary_id, check_id, component_id, filter is required")
}

return nil
Expand Down

0 comments on commit 47f1622

Please sign in to comment.