Fix popularity metrics on list repos API
This commit is contained in:
parent
6bde6406c9
commit
e252ee07cb
4 changed files with 18 additions and 11 deletions
|
@ -175,7 +175,7 @@ class RepositoryList(ApiResource):
|
|||
# Collect the IDs of the repositories found for subequent lookup of popularity
|
||||
# and/or last modified.
|
||||
if parsed_args['last_modified'] or parsed_args['popularity']:
|
||||
repository_ids = [repo.id for repo in repos]
|
||||
repository_ids = [repo.rid for repo in repos]
|
||||
|
||||
if parsed_args['last_modified']:
|
||||
last_modified_map = model.repository.get_when_last_modified(repository_ids)
|
||||
|
@ -198,7 +198,7 @@ class RepositoryList(ApiResource):
|
|||
'is_public': repo_obj.visibility_id == model.repository.get_public_repo_visibility().id,
|
||||
}
|
||||
|
||||
repo_id = repo_obj.id
|
||||
repo_id = repo_obj.rid
|
||||
|
||||
if parsed_args['last_modified']:
|
||||
repo['last_modified'] = last_modified_map.get(repo_id)
|
||||
|
|
Reference in a new issue