1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Merge pull request #296 from nuss-justin/dev

Fix issue 280 & unwatch button in Firefox
This commit is contained in:
无闻
2014-07-22 16:03:58 -04:00
3 changed files with 17 additions and 3 deletions

View File

@@ -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.