From bd80fa889de105c9813d98f296f8916a09aa71c0 Mon Sep 17 00:00:00 2001 From: zhaoxiangchun <1422928955@qq.com> Date: Sun, 19 Jul 2020 21:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=91=E6=8E=A7=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6=E8=A7=84=E5=88=99=E5=88=A0=E9=99=A4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/monitor/models/commonalert.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/monitor/models/commonalert.go b/pkg/monitor/models/commonalert.go index b8e6ea9724..03ffb86ee4 100644 --- a/pkg/monitor/models/commonalert.go +++ b/pkg/monitor/models/commonalert.go @@ -639,7 +639,8 @@ func (alert *SCommonAlert) customizeDeleteNotis( func (alert *SCommonAlert) Delete(ctx context.Context, userCred mcclient.TokenCredential) error { CommonAlertManager.DeleteSubscriptionAlert(alert) - return alert.SetStatus(userCred, monitor.ALERT_STATUS_DELETED, "") + + return alert.SAlert.Delete(ctx, userCred) } func (self *SCommonAlertManager) GetSystemAlerts() ([]SCommonAlert, error) {