list_repository_tag_history fallback orderby name

If tags are created at the same time (usually from a tight loop), it is
possible that they will be order nondeterministically unless we fallback
to another orderby.
This commit is contained in:
Jimmy Zelinskie 2015-09-09 15:51:19 -04:00
parent d55ab78fbe
commit ebdee55585

View file

@ -134,6 +134,7 @@ def list_repository_tag_history(repo_obj, page=1, size=100, specific_tag=None):
.where(RepositoryTag.repository == repo_obj)
.where(RepositoryTag.hidden == False)
.order_by(RepositoryTag.lifetime_start_ts.desc())
.order_by(RepositoryTag.name)
.paginate(page, size))
if specific_tag: