Merge pull request #3401 from quay/fix-oci-tags-ordering

Fix ordering of tags in the OCI model
This commit is contained in:
Joseph Schorr 2019-03-07 13:58:26 -05:00 committed by GitHub
commit 23d8ecc3cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 51 additions and 6 deletions

View file

@ -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],