diff options
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 9184c5e8..aa61dcd9 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -142,11 +142,7 @@ func ForkPost(ctx *context.Context, f form.CreateRepo) { func checkPullInfo(ctx *context.Context) *models.Issue { issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { - if models.IsErrIssueNotExist(err) { - ctx.Handle(404, "GetIssueByIndex", err) - } else { - ctx.Handle(500, "GetIssueByIndex", err) - } + ctx.NotFoundOrServerError("GetIssueByIndex", errors.IsIssueNotExist, err) return nil } ctx.Data["Title"] = issue.Title |