diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-04-23 12:07:12 -0500 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-04-23 13:07:12 -0400 |
commit | 45fa5cc1be0e691e4af9c7182ca2513dc36eb33a (patch) | |
tree | 830cb8b62579b8439c91692a3e53dde9f9b1f4a6 | |
parent | cbf8538635763ee8110dd57687d081c4ef3d3791 (diff) | |
download | gitea-45fa5cc1be0e691e4af9c7182ca2513dc36eb33a.tar.gz gitea-45fa5cc1be0e691e4af9c7182ca2513dc36eb33a.zip |
[API] Load issue attributes when editing an issue (#6723)
-rw-r--r-- | routers/api/v1/repo/issue.go | 6 |
1 files changed, 6 insertions, 0 deletions
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 |