From 45eb092871ad66033dce416d735739669cfd996b Mon Sep 17 00:00:00 2001 From: Carlo Mandelli Date: Wed, 3 Feb 2021 19:45:27 +0100 Subject: [PATCH] Remove WaitingApproval for stopped tasks --- internal/services/runservice/action/action.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/services/runservice/action/action.go b/internal/services/runservice/action/action.go index cf13cf3..d6a0f5a 100644 --- a/internal/services/runservice/action/action.go +++ b/internal/services/runservice/action/action.go @@ -127,6 +127,9 @@ func (h *ActionHandler) StopRun(ctx context.Context, req *RunStopRequest) error return errors.Errorf("run %s is not running but in %q phase", r.ID, r.Phase) } r.Stop = true + for _, t := range r.TasksWaitingApproval() { + r.Tasks[t].WaitingApproval = false + } _, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt) return err