remove type check when retrieve channel

This commit is contained in:
liugq 2023-08-06 10:46:40 +08:00
parent ad440995e9
commit 569543e5ed
1 changed files with 1 additions and 1 deletions

View File

@ -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