Skip to content

Commit

Permalink
fix(api): allow to stop a workflow run marked as to delete (#5207)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt authored May 27, 2020
1 parent 675cda3 commit 71bb5bf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions engine/api/workflow_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,11 @@ func (api *API) stopWorkflowRunHandler() service.Handler {
return err
}

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

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

0 comments on commit 71bb5bf

Please sign in to comment.