Fix nil dereference on error (#30740) (#30746)

Backport #30740 manually

Co-authored-by: Chongyi Zheng <git@zcy.dev>
This commit is contained in:
wxiaoguang
2024-04-29 00:23:35 +00:00
committed by GitHub
co-authored by Chongyi Zheng
parent bb7d36d751
commit d07019f539
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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
}