diff options
author | Unknown <joe2010xtmf@163.com> | 2014-07-06 18:25:07 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-07-06 18:25:07 -0400 |
commit | 7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3 (patch) | |
tree | 86b6d5e3c6fb71452bf6db68af7987d149805a16 /models | |
parent | 9b014d05e4c656d023e57d61af370bc8d8f20216 (diff) | |
download | gitea-7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3.tar.gz gitea-7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3.zip |
Move debug router location
Diffstat (limited to 'models')
-rw-r--r-- | models/issue.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index 6d67a72bc4..baf710a5ee 100644 --- a/models/issue.go +++ b/models/issue.go @@ -276,6 +276,10 @@ func GetIssueUserPairs(rid, uid int64, isClosed bool) ([]*IssueUser, error) { // GetIssueUserPairsByRepoIds returns issue-user pairs by given repository IDs. func GetIssueUserPairsByRepoIds(rids []int64, isClosed bool, page int) ([]*IssueUser, error) { + if len(rids) == 0 { + return []*IssueUser{}, nil + } + buf := bytes.NewBufferString("") for _, rid := range rids { buf.WriteString("repo_id=") @@ -283,7 +287,6 @@ func GetIssueUserPairsByRepoIds(rids []int64, isClosed bool, page int) ([]*Issue buf.WriteString(" OR ") } cond := strings.TrimSuffix(buf.String(), " OR ") - ius := make([]*IssueUser, 0, 10) sess := x.Limit(20, (page-1)*20).Where("is_closed=?", isClosed) if len(cond) > 0 { |