From 8c7d74128722abb0cb03c251eb94ae0dacf86078 Mon Sep 17 00:00:00 2001 From: alexzurbonsen Date: Mon, 16 Dec 2024 16:05:52 +0100 Subject: [PATCH] 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 --- src/licensedcode/detection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/licensedcode/detection.py b/src/licensedcode/detection.py index 7e5bf1dcf8..03f9115084 100644 --- a/src/licensedcode/detection.py +++ b/src/licensedcode/detection.py @@ -1907,6 +1907,7 @@ def process_detections(detections, licensing=Licensing()): for key in license_keys ): detection.license_expression = license_expression + detection.license_expression_spdx = detection.spdx_license_expression() detection.detection_log.append(DetectionRule.NOT_LICENSE_CLUES.value) detection.identifier = detection.identifier_with_expression