1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-21 12:44:49 -05:00

fix non existent milestone with 500 error (#7867)

This commit is contained in:
Lanre Adelowo 2019-08-15 00:43:50 +01:00 committed by techknowlogick
parent 14230ca843
commit a315c8d992

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
}