From 970965f6d8fb4e68613ca445d2414c6c796b5231 Mon Sep 17 00:00:00 2001 From: Chongyi Zheng Date: Sun, 28 Apr 2024 00:13:57 -0400 Subject: Fix nil dereference on error (#30740) In both cases, the `err` is nil because of `if` checks before Reference: #30729 --- routers/web/repo/actions/view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/web/repo/actions/view.go') 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 } -- cgit v1.2.3