From 45fa5cc1be0e691e4af9c7182ca2513dc36eb33a Mon Sep 17 00:00:00 2001 From: John Olheiser <42128690+jolheiser@users.noreply.github.com> Date: Tue, 23 Apr 2019 12:07:12 -0500 Subject: [PATCH] [API] Load issue attributes when editing an issue (#6723) --- routers/api/v1/repo/issue.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index 08bc732530..c14fc78ee4 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -291,6 +291,12 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { } issue.Repo = ctx.Repo.Repository + err = issue.LoadAttributes() + if err != nil { + ctx.Error(500, "LoadAttributes", err) + return + } + if !issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWrite(models.UnitTypeIssues) { ctx.Status(403) return