Skip to content

Commit 71bb5bf

Browse files
authored
fix(api): allow to stop a workflow run marked as to delete (#5207)
1 parent 675cda3 commit 71bb5bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

engine/api/workflow_run.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,11 @@ func (api *API) stopWorkflowRunHandler() service.Handler {
348348
return err
349349
}
350350

351-
run, errL := workflow.LoadRun(ctx, api.mustDB(), key, name, number, workflow.LoadRunOptions{})
352-
if errL != nil {
353-
return sdk.WrapError(errL, "stopWorkflowRunHandler> Unable to load last workflow run")
351+
run, err := workflow.LoadRun(ctx, api.mustDB(), key, name, number, workflow.LoadRunOptions{
352+
WithDeleted: true,
353+
})
354+
if err != nil {
355+
return sdk.WrapError(err, "unable to load last workflow run")
354356
}
355357

356358
proj, errP := project.Load(api.mustDB(), key)

0 commit comments

Comments
 (0)