diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-07-22 16:03:58 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-07-22 16:03:58 -0400 |
commit | dc2e1403603789e438ced9ac7dceb736d70f426c (patch) | |
tree | 9f27b9fb3907ef0bdb2f2c1a779776fcb37fd1cc /models | |
parent | 5bbd5be0caf35f23de833f765e2eeb0e5772fbf3 (diff) | |
parent | ec26b78d3cf1a72d0895ce37dc37b3f9cc3c11ea (diff) | |
download | gitea-dc2e1403603789e438ced9ac7dceb736d70f426c.tar.gz gitea-dc2e1403603789e438ced9ac7dceb736d70f426c.zip |
Merge pull request #296 from nuss-justin/dev
Fix issue 280 & unwatch button in Firefox
Diffstat (limited to 'models')
-rw-r--r-- | models/issue.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index baf710a5ee..c370af363e 100644 --- a/models/issue.go +++ b/models/issue.go @@ -108,7 +108,17 @@ func NewIssue(issue *Issue) (err error) { sess.Rollback() return err } - return sess.Commit() + + if err = sess.Commit(); err != nil { + return err + } + + if issue.MilestoneId > 0 { + // FIXES(280): Update milestone counter. + return ChangeMilestoneAssign(0, issue.MilestoneId, issue) + } + + return } // GetIssueByIndex returns issue by given index in repository. |