diff options
Diffstat (limited to 'models/actions/run.go')
-rw-r--r-- | models/actions/run.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/models/actions/run.go b/models/actions/run.go index 1af8f897fa..22041b65a9 100644 --- a/models/actions/run.go +++ b/models/actions/run.go @@ -197,7 +197,9 @@ func InsertRun(ctx context.Context, run *ActionRun, jobs []*jobparser.SingleWork for _, v := range jobs { id, job := v.Job() needs := job.Needs() - job.EraseNeeds() + if err := v.SetJob(id, job.EraseNeeds()); err != nil { + return err + } payload, _ := v.Marshal() status := StatusWaiting if len(needs) > 0 || run.NeedApproval { |