1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-05 01:34:25 +00:00

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

This commit is contained in:
Lanre Adelowo 2019-08-15 02:37:59 +01:00 committed by Lunny Xiao
parent ab23e4b7f4
commit 68424eddf0

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
}