Skip to content

Commit

Permalink
Consider all PURL fields when ordering Packages #411 #438
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <jyang@nexb.com>
  • Loading branch information
JonoYang committed Jun 13, 2022
1 parent 1592cd3 commit 9fcec67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scanpipe/pipes/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ def get_headers(self, project):
def get_packages(self, project):
from scanpipe.api.serializers import DiscoveredPackageSerializer

packages = project.discoveredpackages.all().order_by("type", "name")
packages = project.discoveredpackages.all().order_by(
"type", "namespace", "name", "version"
)

for obj in packages.iterator():
yield self.encode(DiscoveredPackageSerializer(obj).data)
Expand Down

0 comments on commit 9fcec67

Please sign in to comment.