Skip to content

Commit c11e045

Browse files
committed
Use status from matched package results when creating DiscoveredPackage
Signed-off-by: Jono Yang <[email protected]>
1 parent 3bfad95 commit c11e045

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scanpipe/pipes/matchcode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,14 @@ def create_packages_from_match_results(project, match_results):
402402
matched_packages = match_results.get("packages", [])
403403
for matched_package in matched_packages:
404404
package_uid = matched_package["package_uid"]
405+
match_status = matched_package.get("extra_data", {}).get("matchcodeio_match_status", flag.MATCHED_TO_PURLDB_PACKAGE)
405406
resource_paths = resource_paths_by_package_uids[package_uid]
406407
resources = project.codebaseresources.filter(path__in=resource_paths)
407408
create_package_from_purldb_data(
408409
project,
409410
resources=resources,
410411
package_data=matched_package,
411-
status=flag.MATCHED_TO_PURLDB_PACKAGE,
412+
status=match_status,
412413
)
413414
match_resources = match_results.get("files", [])
414415
for match_resource in match_resources:

0 commit comments

Comments
 (0)