From 136e6beb0f3c26bdf26711dba49513aa2be3aa2e Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Sun, 26 Feb 2017 21:16:35 -0500 Subject: Fix unused Engine bugs (#1064) --- models/repo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'models/repo.go') diff --git a/models/repo.go b/models/repo.go index 2018f4c134..578b54f8a7 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1734,15 +1734,15 @@ func GetUserMirrorRepositories(userID int64) ([]*Repository, error) { } func getRepositoryCount(e Engine, u *User) (int64, error) { - return x.Count(&Repository{OwnerID: u.ID}) + return e.Count(&Repository{OwnerID: u.ID}) } func getPublicRepositoryCount(e Engine, u *User) (int64, error) { - return x.Where("is_private = ?", false).Count(&Repository{OwnerID: u.ID}) + return e.Where("is_private = ?", false).Count(&Repository{OwnerID: u.ID}) } func getPrivateRepositoryCount(e Engine, u *User) (int64, error) { - return x.Where("is_private = ?", true).Count(&Repository{OwnerID: u.ID}) + return e.Where("is_private = ?", true).Count(&Repository{OwnerID: u.ID}) } // GetRepositoryCount returns the total number of repositories of user. -- cgit v1.2.3