diff --git a/scanpipe/views.py b/scanpipe/views.py index 6b88541d9..2662564c2 100644 --- a/scanpipe/views.py +++ b/scanpipe/views.py @@ -258,37 +258,28 @@ def as_icon(field_value): def get_summary_data(self, summary): summary_fields = [ - ('Primary License Expression', 'primary_license_expression'), - ('Declared License Expressions', 'declared_license_expressions'), - ('Other License Expressions', 'license_expressions'), - ('Copyright Holders', 'holders') + ('Declared License', 'declared_license_expression'), + ('Declared Holder', 'declared_holder'), + ('Primary Language', 'primary_language'), + ('Other Licenses', 'other_license_expressions'), + ('Other Holders', 'other_holders'), + ('Other Languages', 'other_languages') ] - declared_license_expressions = summary.get('declared_license_expressions', []) - detected_license_expressions = summary.get('license_expressions', []) - declared_license_expressions_with_count = [] - other_license_expressions = [] - for entry in detected_license_expressions: - license_expression = entry.get('value') - if license_expression in declared_license_expressions: - declared_license_expressions_with_count.append(entry) - else: - other_license_expressions.append(entry) - summary_data = {} for field_label, field_name in summary_fields: value = summary.get(field_name) if not value: continue - if field_name == 'primary_license_expression': + if field_name in ( + 'declared_license_expression', + 'declared_holder', + 'primary_language' + ): summary_data[field_label] = [ { 'value': value, } ] - elif field_name == 'declared_license_expressions': - summary_data[field_label] = declared_license_expressions_with_count - elif field_name == 'license_expressions': - summary_data[field_label] = other_license_expressions else: summary_data[field_label] = value return summary_data diff --git a/setup.cfg b/setup.cfg index 681d51f99..f3c827a75 100644 --- a/setup.cfg +++ b/setup.cfg @@ -70,9 +70,9 @@ install_requires = # Docker container_inspector==30.0.0 # ScanCode-toolkit - scancode-toolkit[packages]==30.1.0 + scancode-toolkit[packages]==31.0.0b1 extractcode[full]==30.0.0 - commoncode==30.1.0 + commoncode==30.1.1 # FetchCode fetchcode-container==1.2.3.210512; sys_platform == "linux" # Utilities