summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-25 14:17:55 -0500
committerUnknwon <u@gogs.io>2016-02-25 14:17:55 -0500
commit129638117f1eed78475a041bd65097e56939caca (patch)
tree23d9c8b6827e986be30511f1cc7d222edf38ab73 /routers
parent4438b7793b143c71675b0ae954036830b7afd2b7 (diff)
downloadgitea-129638117f1eed78475a041bd65097e56939caca.tar.gz
gitea-129638117f1eed78475a041bd65097e56939caca.zip
#2697 fix panic when close issue via commit message
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 1188eddc26..5c7615054c 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -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)