Skip to content

Commit

Permalink
Sort collect endpoint results by most recent version first #508
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed Aug 1, 2024
1 parent b0761cc commit 6c1a901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packagedb/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def list(self, request, format=None):
return Response(message, status=status.HTTP_400_BAD_REQUEST)

lookups = purl_to_lookups(purl)
packages = Package.objects.filter(**lookups)
packages = Package.objects.filter(**lookups).order_by('-version')
if packages.count() == 0:
message = {}
if errors:
Expand Down

0 comments on commit 6c1a901

Please sign in to comment.