Browse Source

Show 404 page when release not found (#12328) (#12332)

Signed-off-by: a101211279 <1012112796@qq.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
tags/v1.12.3
techknowlogick 3 years ago
parent
commit
9bac656b7d
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      routers/repo/release.go

+ 4
- 0
routers/repo/release.go View File

@@ -134,6 +134,10 @@ func SingleRelease(ctx *context.Context) {

release, err := models.GetRelease(ctx.Repo.Repository.ID, ctx.Params("tag"))
if err != nil {
if models.IsErrReleaseNotExist(err) {
ctx.NotFound("GetRelease", err)
return
}
ctx.ServerError("GetReleasesByRepoID", err)
return
}

Loading…
Cancel
Save