diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 1246ede9e6d7a..4c139fb1326b0 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -489,6 +489,11 @@ func EditPullRequest(ctx *context.APIContext) { } issue := pr.Issue issue.Repo = ctx.Repo.Repository + + if err := issue.LoadAttributes(ctx); err != nil { + ctx.Error(http.StatusInternalServerError, "LoadAttributes", err) + return + } if !issue.IsPoster(ctx.Doer.ID) && !ctx.Repo.CanWrite(unit.TypePullRequests) { ctx.Status(http.StatusForbidden)