diff options
author | Chongyi Zheng <git@zcy.dev> | 2024-04-28 00:13:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-28 12:13:57 +0800 |
commit | 970965f6d8fb4e68613ca445d2414c6c796b5231 (patch) | |
tree | 6bb3be8eb0c990fc0601f95232110fe8b6b711cf /routers/web/repo/actions/view.go | |
parent | 8b8b48ef5fb1c5c164d5534ea4b8049f1db26ce9 (diff) | |
download | gitea-970965f6d8fb4e68613ca445d2414c6c796b5231.tar.gz gitea-970965f6d8fb4e68613ca445d2414c6c796b5231.zip |
Fix nil dereference on error (#30740)
In both cases, the `err` is nil because of `if` checks before
Reference: #30729
Diffstat (limited to 'routers/web/repo/actions/view.go')
-rw-r--r-- | routers/web/repo/actions/view.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index 3909a64be6..12909bddd5 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -504,7 +504,7 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions return nil, nil } if len(jobs) == 0 { - ctx.Error(http.StatusNotFound, err.Error()) + ctx.Error(http.StatusNotFound) return nil, nil } |