From 569543e5edbc67c60b1e07129e93289ac368c33b Mon Sep 17 00:00:00 2001 From: liugq Date: Sun, 6 Aug 2023 10:46:40 +0800 Subject: [PATCH] remove type check when retrieve channel --- service/alerting/common/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/alerting/common/helper.go b/service/alerting/common/helper.go index ecb8d5ed..faf5e344 100644 --- a/service/alerting/common/helper.go +++ b/service/alerting/common/helper.go @@ -77,7 +77,7 @@ func RetrieveChannel(ch *alerting.Channel) (*alerting.Channel, error) { return nil, fmt.Errorf("empty channel") } enabled := ch.Enabled - if ch.ID != "" && ((ch.Email == nil && ch.Type == alerting.ChannelEmail) || (ch.Webhook == nil && ch.Type == alerting.ChannelWebhook)) { + if ch.ID != "" { _, err := orm.Get(ch) if err != nil { return nil, err