]> source.dussan.org Git - gitea.git/commitdiff
Fix #181
authorUnknown <joe2010xtmf@163.com>
Tue, 13 May 2014 18:49:20 +0000 (14:49 -0400)
committerUnknown <joe2010xtmf@163.com>
Tue, 13 May 2014 18:49:20 +0000 (14:49 -0400)
models/issue.go

index 213fd1f2ab82b152565caabcc984bc0def567f50..dad89f56c40cca04dbcc35c8517e204e84a0824a 100644 (file)
@@ -10,6 +10,8 @@ import (
        "strings"
        "time"
 
+       "github.com/go-xorm/xorm"
+
        "github.com/gogits/gogs/modules/base"
 )
 
@@ -281,9 +283,10 @@ const (
 func GetIssueStats(rid, uid int64, isShowClosed bool, filterMode int) *IssueStats {
        stats := &IssueStats{}
        issue := new(Issue)
+       tmpSess := &xorm.Session{}
 
        sess := orm.Where("repo_id=?", rid)
-       tmpSess := sess
+       *tmpSess = *sess
        stats.OpenCount, _ = tmpSess.And("is_closed=?", false).Count(issue)
        *tmpSess = *sess
        stats.ClosedCount, _ = tmpSess.And("is_closed=?", true).Count(issue)