Skip to content

Commit

Permalink
Set default sort on collect endpoint #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 2, 2024
1 parent 91ff7c4 commit 294117a
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 @@ -819,7 +819,7 @@ def list(self, request, format=None):

validated_data = serializer.validated_data
purl = validated_data.get('purl')
sort = validated_data.get('sort', [])
sort = validated_data.get('sort') or ['-version',]

kwargs = dict()
# We want this request to have high priority since the user knows the
Expand Down

0 comments on commit 294117a

Please sign in to comment.