fix alert put api not verify bug (#987)
This commit is contained in:
parent
90db12b513
commit
f9af916352
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue