packageurl-python icon indicating copy to clipboard operation
packageurl-python copied to clipboard

Return empty purl fields in purl_to_lookups

Open JonoYang opened this issue 1 year ago • 0 comments

purl_to_lookups in django/utils.py returns the purl fields that have values. It would be nice to have an option for it to return all purl fields, even if the field was not populated. This is helpful in the case where we have two packages, pkg:maven/net.minidev/[email protected] and pkg:maven/net.minidev/[email protected]?classifier=sources. When I use purl_to_lookups on pkg:maven/net.minidev/[email protected], and then use that to get a Package from the database, it returns pkg:maven/net.minidev/[email protected] and pkg:maven/net.minidev/[email protected]?classifier=sources, when I just want pkg:maven/net.minidev/[email protected]

JonoYang avatar Apr 24 '23 21:04 JonoYang