forked from kevadesu/forgejo
#2697 fix panic when close issue via commit message
This commit is contained in:
parent
4438b7793b
commit
129638117f
7 changed files with 11 additions and 12 deletions
|
@ -914,8 +914,7 @@ func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) {
|
|||
if pr != nil {
|
||||
ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index))
|
||||
} else {
|
||||
issue.Repo = ctx.Repo.Repository
|
||||
if err = issue.ChangeStatus(ctx.User, form.Status == "close"); err != nil {
|
||||
if err = issue.ChangeStatus(ctx.User, ctx.Repo.Repository, form.Status == "close"); err != nil {
|
||||
log.Error(4, "ChangeStatus: %v", err)
|
||||
} else {
|
||||
log.Trace("Issue [%d] status changed to closed: %v", issue.ID, issue.IsClosed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue