Merge pull request #1724 from coreos-inc/public-order-by
Hack to temporarily fix pagination over public repos
This commit is contained in:
commit
cbc9ec7848
1 changed files with 8 additions and 1 deletions
|
@ -159,7 +159,14 @@ class RepositoryList(ApiResource):
|
|||
|
||||
repo_query = model.repository.get_user_starred_repositories(user)
|
||||
else:
|
||||
repo_query = model.repository.get_visible_repositories(username=username,
|
||||
# TEMP: Only supply the filter username if a specific namespace is requested. If the request
|
||||
# is for all public repositories, simply return them. This ensures that we don't paginate
|
||||
# over a union query.
|
||||
# TODO(jschorr): Fix pagination for union queries so we can remove this restriction!
|
||||
filter_username = (username if not parsed_args['namespace'] and not parsed_args['starred']
|
||||
else None)
|
||||
|
||||
repo_query = model.repository.get_visible_repositories(username=filter_username,
|
||||
include_public=parsed_args['public'],
|
||||
namespace=parsed_args['namespace'])
|
||||
|
||||
|
|
Reference in a new issue