Skip to content

Commit

Permalink
[API] Load issue attributes when editing an issue (go-gitea#6723) (go…
Browse files Browse the repository at this point in the history
  • Loading branch information
jolheiser authored and lafriks committed Apr 23, 2019
1 parent 799f5e0 commit b1cb52e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routers/api/v1/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1cb52e

Please sign in to comment.