Fix ordering of tags in the OCI model
Before this change, we were neglecting to sort the tags by ID, which meant that pagination was broken
This commit is contained in:
parent
d3dd2f7b7c
commit
96072a44c0
6 changed files with 51 additions and 6 deletions
|
@ -21,7 +21,7 @@ def list_all_tags(namespace_name, repo_name, start_id, limit, pagination_callbac
|
|||
# NOTE: We add 1 to the limit because that's how pagination_callback knows if there are
|
||||
# additional tags.
|
||||
tags = registry_model.list_repository_tags(repository_ref, start_pagination_id=start_id,
|
||||
limit=limit + 1)
|
||||
limit=limit + 1, sort_tags=True)
|
||||
response = jsonify({
|
||||
'name': '{0}/{1}'.format(namespace_name, repo_name),
|
||||
'tags': [tag.name for tag in tags][0:limit],
|
||||
|
|
Reference in a new issue