Remove WaitingApproval for stopped tasks
This commit is contained in:
parent
c3c18e0d2c
commit
45eb092871
|
@ -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)
|
return errors.Errorf("run %s is not running but in %q phase", r.ID, r.Phase)
|
||||||
}
|
}
|
||||||
r.Stop = true
|
r.Stop = true
|
||||||
|
for _, t := range r.TasksWaitingApproval() {
|
||||||
|
r.Tasks[t].WaitingApproval = false
|
||||||
|
}
|
||||||
|
|
||||||
_, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt)
|
_, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue