mirror of
https://github.com/go-gitea/gitea.git
synced 2025-05-25 17:11:15 +00:00
Backport #34459 by NorthRealm Co-authored-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com>
This commit is contained in:
parent
a1dc3c9bd1
commit
9bd56a8ba0
@ -584,20 +584,20 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions
|
|||||||
run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
|
run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, util.ErrNotExist) {
|
if errors.Is(err, util.ErrNotExist) {
|
||||||
ctx.HTTPError(http.StatusNotFound, err.Error())
|
ctx.NotFound(nil)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
ctx.HTTPError(http.StatusInternalServerError, err.Error())
|
ctx.ServerError("GetRunByIndex", err)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
run.Repo = ctx.Repo.Repository
|
run.Repo = ctx.Repo.Repository
|
||||||
jobs, err := actions_model.GetRunJobsByRunID(ctx, run.ID)
|
jobs, err := actions_model.GetRunJobsByRunID(ctx, run.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.HTTPError(http.StatusInternalServerError, err.Error())
|
ctx.ServerError("GetRunJobsByRunID", err)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if len(jobs) == 0 {
|
if len(jobs) == 0 {
|
||||||
ctx.HTTPError(http.StatusNotFound)
|
ctx.NotFound(nil)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user