diff options
author | Unknwon <u@gogs.io> | 2016-02-10 17:30:24 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-10 17:30:24 -0500 |
commit | 59745c62b48efff2d120f84b2b57505c5783482a (patch) | |
tree | 664f8a48a8508857082906ef7e8af36b9bdb23f8 | |
parent | 0ad5f51059c3d7397b8a1b559cb4df69026ebb26 (diff) | |
download | gitea-59745c62b48efff2d120f84b2b57505c5783482a.tar.gz gitea-59745c62b48efff2d120f84b2b57505c5783482a.zip |
#1577 fix missing SQL query placeholder
-rw-r--r-- | models/repo.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index f838de7eaa..95063134a8 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 } |