mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
alerting: return err when SetAlertState fails to save to sql (#18216)
fix duplicate alert states when the alert fails to save to the database. fixes #18176
This commit is contained in:
parent
2014549fa5
commit
172464e91e
@ -298,7 +298,10 @@ func SetAlertState(cmd *m.SetAlertStateCommand) error {
|
||||
alert.ExecutionError = cmd.Error
|
||||
}
|
||||
|
||||
sess.ID(alert.Id).Update(&alert)
|
||||
_, err := sess.ID(alert.Id).Update(&alert)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cmd.Result = alert
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user