|
|
@@ -222,7 +222,11 @@ func SetAlertState(cmd *m.SetAlertStateCommand) error {
|
|
|
alert.State = cmd.State
|
|
|
alert.StateChanges += 1
|
|
|
alert.NewStateDate = time.Now()
|
|
|
- alert.ExecutionError = cmd.Error
|
|
|
+ if cmd.Error == "" {
|
|
|
+ alert.ExecutionError = " " //without this space, xorm skips updating this field
|
|
|
+ } else {
|
|
|
+ alert.ExecutionError = cmd.Error
|
|
|
+ }
|
|
|
|
|
|
sess.Id(alert.Id).Update(&alert)
|
|
|
return nil
|