Skip to content

Commit 8c7d741

Browse files
committed
Fix missing spdx license expression in license detection
Occassionally, the spdx license expression is missing in license detections even though the license expression itself is non-null and a matching spdx expression would be available. At least some instances of this bug are due to post processing of detections, in which only the license expression but not the spdx license expression is corrected for license clues that are converted to license detections in post processing. Signed-off-by: alexzurbonsen <alexander.zur.bonsen@tngtech.com>
1 parent c40476a commit 8c7d741

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/licensedcode/detection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,6 +1907,7 @@ def process_detections(detections, licensing=Licensing()):
19071907
for key in license_keys
19081908
):
19091909
detection.license_expression = license_expression
1910+
detection.license_expression_spdx = detection.spdx_license_expression()
19101911
detection.detection_log.append(DetectionRule.NOT_LICENSE_CLUES.value)
19111912
detection.identifier = detection.identifier_with_expression
19121913

0 commit comments

Comments
 (0)