diff options
author | Unknwon <u@gogs.io> | 2015-09-25 19:07:21 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-25 19:07:21 -0400 |
commit | 986447335dd4057003b2715034948e87a47bed6b (patch) | |
tree | 3dbe131aaec4ff3cd6fb50d88436ea3735b68ee5 /models | |
parent | 84c727ae6657c89885a5039a4dcd77d6be3fcf01 (diff) | |
download | gitea-986447335dd4057003b2715034948e87a47bed6b.tar.gz gitea-986447335dd4057003b2715034948e87a47bed6b.zip |
#1693 minor fix
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index c05c0098f2..34de3d14db 100644 --- a/models/repo.go +++ b/models/repo.go @@ -775,13 +775,14 @@ func CountRepositories() int64 { func CountPublicRepositories() int64 { return countRepositories(false) } + // RepositoriesWithUsers returns number of repos in given page. func RepositoriesWithUsers(page, pageSize int) ([]*Repository, error) { repos := make([]*Repository, 0, pageSize) if err := x.Limit(pageSize, (page-1)*pageSize).Asc("id").Find(&repos); err != nil { return nil, err } - + for _, repo := range repos { repo.Owner = &User{Id: repo.OwnerID} has, err := x.Get(repo.Owner) @@ -793,7 +794,6 @@ func RepositoriesWithUsers(page, pageSize int) ([]*Repository, error) { } return repos, nil - } // RepoPath returns repository path by given user and repository name. |