From b1cb52e477c6fc129dd99d1c342ab8b04b1b35f0 Mon Sep 17 00:00:00 2001 From: John Olheiser <42128690+jolheiser@users.noreply.github.com> Date: Tue, 23 Apr 2019 12:48:20 -0500 Subject: [PATCH] [API] Load issue attributes when editing an issue (#6723) (#6725) --- 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 27b3d93a75..e0c2229b31 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