NorthRealm 7 months ago committed by GitHub
parent
commit
dd500ce559
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      routers/web/repo/actions/view.go

8
routers/web/repo/actions/view.go

@ -611,20 +611,20 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions @@ -611,20 +611,20 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions
run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
if err != nil {
if errors.Is(err, util.ErrNotExist) {
ctx.HTTPError(http.StatusNotFound, err.Error())
ctx.NotFound(nil)
return nil, nil
}
ctx.HTTPError(http.StatusInternalServerError, err.Error())
ctx.ServerError("GetRunByIndex", err)
return nil, nil
}
run.Repo = ctx.Repo.Repository
jobs, err := actions_model.GetRunJobsByRunID(ctx, run.ID)
if err != nil {
ctx.HTTPError(http.StatusInternalServerError, err.Error())
ctx.ServerError("GetRunJobsByRunID", err)
return nil, nil
}
if len(jobs) == 0 {
ctx.HTTPError(http.StatusNotFound)
ctx.NotFound(nil)
return nil, nil
}

Loading…
Cancel
Save