mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-24 21:34:36 -04:00
fix non existent milestone with 500 error (#7867)
This commit is contained in:
parent
14230ca843
commit
a315c8d992
@ -253,6 +253,11 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
|
|||||||
milestoneID := ctx.ParamsInt64(":id")
|
milestoneID := ctx.ParamsInt64(":id")
|
||||||
milestone, err := models.GetMilestoneByID(milestoneID)
|
milestone, err := models.GetMilestoneByID(milestoneID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if models.IsErrMilestoneNotExist(err) {
|
||||||
|
ctx.NotFound("GetMilestoneByID", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx.ServerError("GetMilestoneByID", err)
|
ctx.ServerError("GetMilestoneByID", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user