From f9af916352743b2bef268631050f20af82765d24 Mon Sep 17 00:00:00 2001 From: chenxuan <77540051+chenxuan520@users.noreply.github.com> Date: Mon, 20 Jun 2022 11:50:14 +0800 Subject: [PATCH] fix alert put api not verify bug (#987) --- src/models/alert_rule.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/models/alert_rule.go b/src/models/alert_rule.go index d6fbb7a1..1fc9ed63 100644 --- a/src/models/alert_rule.go +++ b/src/models/alert_rule.go @@ -163,6 +163,10 @@ func (ar *AlertRule) Update(arf AlertRule) error { arf.CreateBy = ar.CreateBy arf.UpdateAt = time.Now().Unix() + err = arf.Verify() + if err != nil { + return err + } return DB().Model(ar).Select("*").Updates(arf).Error } -- GitLab