From 7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 6 Jul 2014 18:25:07 -0400 Subject: Move debug router location --- models/issue.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'models/issue.go') 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 { -- cgit v1.2.3