From 59745c62b48efff2d120f84b2b57505c5783482a Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 10 Feb 2016 17:30:24 -0500 Subject: [PATCH] #1577 fix missing SQL query placeholder --- models/repo.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/models/repo.go b/models/repo.go index f838de7eaa1..95063134a8f 100644 --- a/models/repo.go +++ b/models/repo.go @@ -957,10 +957,13 @@ func countRepositories(showPrivate bool) int64 { sess := x.NewSession() if !showPrivate { - sess.Where("is_private=", false) + sess.Where("is_private=?", false) } - count, _ := sess.Count(new(Repository)) + count, err := sess.Count(new(Repository)) + if err != nil { + log.Error(4, "countRepositories: %v", err) + } return count }