From 6815a518c87d8aecb27a5ee0d9f1dc8165669a9a Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Tue, 16 May 2023 19:16:02 -0700 Subject: [PATCH] Use individual purl fields for ordering #95 Signed-off-by: Jono Yang --- packagedb/api.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packagedb/api.py b/packagedb/api.py index 9cc8b499..93a3cab0 100644 --- a/packagedb/api.py +++ b/packagedb/api.py @@ -364,7 +364,15 @@ def get_enhanced_package(package): """ packages = Package.objects.filter( package_set=package.package_set - ).order_by('package_content', 'purl') + ).order_by( + 'package_content', + 'type', + 'namespace', + 'name', + 'version', + 'qualifiers', + 'subpath' + ) return _get_enhanced_package(package, packages)