From 8d73832bdfeecb3889cf5a1f2b4e41b9d4d37f62 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 29 Aug 2015 23:49:17 +0800 Subject: [PATCH] fix sql --- models/issue.go | 2 +- routers/user/home.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/models/issue.go b/models/issue.go index 325c2c938cd7..5ae7f32bcdcf 100644 --- a/models/issue.go +++ b/models/issue.go @@ -410,7 +410,7 @@ func Issues(uid, assigneeID, repoID, posterID, milestoneID int64, repoIDs []int6 if repoID > 0 { sess.Where("issue.repo_id=?", repoID).And("issue.is_closed=?", isClosed) } else if repoIDs != nil { - sess.Where("issue.repo_id IN (?)", strings.Join(base.Int64sToStrings(repoIDs), ",")).And("issue.is_closed=?", isClosed) + sess.Where("issue.repo_id IN ("+strings.Join(base.Int64sToStrings(repoIDs), ",")+")").And("issue.is_closed=?", isClosed) } else { sess.Where("issue.is_closed=?", isClosed) } diff --git a/routers/user/home.go b/routers/user/home.go index 6ae11bb17d41..95e0fc0fe00e 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -224,10 +224,6 @@ func Issues(ctx *middleware.Context) { } ctx.Data["Repos"] = showRepos - if repoID > 0 { - repoIDs = []int64{repoID} - } - issueStats := models.GetUserIssueStats(repoID, ctxUser.Id, repoIDs, filterMode) issueStats.AllCount = int64(allCount)