mirror of
https://github.com/grafana/grafana.git
synced 2026-08-19 01:34:54 -05:00
Chore: Fix pass context for SetAlertStateCommand (#42135)
* fix pass ctx for SetAlertStateCommand * fix integration test
This commit is contained in:
@@ -58,7 +58,7 @@ func (handler *defaultResultHandler) handle(evalContext *EvalContext) error {
|
||||
EvalData: annotationData,
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(cmd); err != nil {
|
||||
if err := bus.DispatchCtx(evalContext.Ctx, cmd); err != nil {
|
||||
if errors.Is(err, models.ErrCannotChangeStateOnPausedAlert) {
|
||||
handler.log.Error("Cannot change state on alert that's paused", "error", err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user