Skip to content

Commit

Permalink
fix non existent milestone with 500 error (#7867)
Browse files Browse the repository at this point in the history
  • Loading branch information
adelowo authored and techknowlogick committed Aug 14, 2019
1 parent 14230ca commit a315c8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routers/repo/milestone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a315c8d

Please sign in to comment.