aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/actions/view.go
diff options
context:
space:
mode:
authorChongyi Zheng <git@zcy.dev>2024-04-28 00:13:57 -0400
committerGitHub <noreply@github.com>2024-04-28 12:13:57 +0800
commit970965f6d8fb4e68613ca445d2414c6c796b5231 (patch)
tree6bb3be8eb0c990fc0601f95232110fe8b6b711cf /routers/web/repo/actions/view.go
parent8b8b48ef5fb1c5c164d5534ea4b8049f1db26ce9 (diff)
downloadgitea-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.go2
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
}