File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
templates/component_catalog/tabs Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 66 < th > {% trans 'Package URL' %}</ th >
77 < th > {% trans 'Download URL' %}</ th >
88 < th > {% trans 'Filename' %}</ th >
9+ < th > {% trans 'Concluded license' %}</ th >
910 </ tr >
1011 </ thead >
1112 < tbody >
2122 < a href ="{{ package.get_absolute_url }} " target ="_blank "> {{ package.package_url }}</ a >
2223 {% endif %}
2324 </ td >
24- < td > {{ package.download_url|default_if_none:"" }}</ td >
2525 < td > {{ package.filename|default_if_none:"" }}</ td >
26+ < td > {{ package.download_url|default_if_none:"" }}</ td >
27+ < td > {{ package.license_expression|default_if_none:"" }}</ td >
2628 </ tr >
2729 {% endfor %}
2830 </ tbody >
Original file line number Diff line number Diff line change 6767from component_catalog .license_expression_dje import get_unique_license_keys
6868from component_catalog .models import Component
6969from component_catalog .models import Package
70+ from component_catalog .models import PACKAGE_URL_FIELDS
7071from component_catalog .models import PackageAlreadyExistsWarning
7172from component_catalog .models import Subcomponent
7273from dejacode_toolkit .download import DataCollectionException
@@ -1300,7 +1301,24 @@ def tab_others(self):
13001301
13011302 def tab_package_set (self ):
13021303 plain_url = self .object .plain_package_url
1303- related_packages = self .get_queryset ().for_package_url (plain_url )
1304+ related_packages = (
1305+ self .model .objects .scope (self .object .dataspace )
1306+ .for_package_url (plain_url )
1307+ .only (
1308+ "uuid" ,
1309+ * PACKAGE_URL_FIELDS ,
1310+ "filename" ,
1311+ "download_url" ,
1312+ "license_expression" ,
1313+ "dataspace__name" ,
1314+ )
1315+ .order_by (
1316+ * PACKAGE_URL_FIELDS ,
1317+ "filename" ,
1318+ "download_url" ,
1319+ )
1320+ .distinct ()
1321+ )
13041322
13051323 template = "component_catalog/tabs/tab_package_set.html"
13061324 if len (related_packages ) > 1 :
You can’t perform that action at this time.
0 commit comments