diff --git a/CHANGES/2571.bugfix b/CHANGES/2571.bugfix new file mode 100644 index 000000000..848f6ceea --- /dev/null +++ b/CHANGES/2571.bugfix @@ -0,0 +1 @@ +Add default descending semver ordering to the collection version search endpoint when no explicit ordering is requested. diff --git a/pulp_ansible/app/galaxy/v3/viewsets.py b/pulp_ansible/app/galaxy/v3/viewsets.py index 602d6e4ec..701f33184 100644 --- a/pulp_ansible/app/galaxy/v3/viewsets.py +++ b/pulp_ansible/app/galaxy/v3/viewsets.py @@ -85,7 +85,7 @@ def get_queryset(self): if hasattr(permission_class, "scope_queryset"): qs = permission_class.scope_queryset(self, qs) - return qs + return qs.order_by("-collection_version__version") def rebuild(self, request, *args, **kwargs): async_result = dispatch(