Browse Source

fix non existent milestone with 500 error (#7867) (#7873)

tags/v1.9.2
Lanre Adelowo 4 years ago
parent
commit
68424eddf0
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      routers/repo/milestone.go

+ 5
- 0
routers/repo/milestone.go View File

@@ -253,6 +253,11 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
milestoneID := ctx.ParamsInt64(":id")
milestone, err := models.GetMilestoneByID(milestoneID)
if err != nil {
if models.IsErrMilestoneNotExist(err) {
ctx.NotFound("GetMilestoneByID", err)
return
}

ctx.ServerError("GetMilestoneByID", err)
return
}

Loading…
Cancel
Save