Fix SQL error with pagination around Repositories

Fixes #1591
This commit is contained in:
Joseph Schorr 2016-06-30 17:31:35 -04:00
parent 36fa93a0fb
commit 1eec6f53b2
4 changed files with 27 additions and 14 deletions

View file

@ -166,7 +166,8 @@ class RepositoryList(ApiResource):
# result in far smaller queries.
if not parsed_args['namespace'] and not parsed_args['starred']:
repos, next_page_token = model.modelutil.paginate(repo_query, repo_query.c,
page_token=page_token, limit=REPOS_PER_PAGE)
page_token=page_token, limit=REPOS_PER_PAGE,
id_field='rid')
else:
repos = list(repo_query)
next_page_token = None