Browse Source

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

tags/v1.9.2
Lanre Adelowo 6 years ago committed by Lunny Xiao
parent
commit
68424eddf0
  1. 5
      routers/repo/milestone.go

5
routers/repo/milestone.go

@ -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