Chore: Fix pass context for SetAlertStateCommand (#42135)

* fix pass ctx for SetAlertStateCommand

* fix integration test
This commit is contained in:
Will Browne
2021-11-23 16:40:09 +01:00
committed by GitHub
parent cec2d965ec
commit 96b1776856
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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