File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,12 @@ def get_components_passing_policy(policy_result: dict) -> dict[str, int] | None:
298298 logger .info ("Encountered software component failing the policy. No VSA is generated." )
299299 return None
300300
301- # key: PURL; value: result with the highest component id
301+ # This dictionary deduplicates multiple occurrences of the same PURL in the
302+ # ``component_satisfies_policy_facts`` result, which may occur because the same PURL
303+ # may appear multiple times in the ``_component`` table of the database.
304+ # Here, we are only taking the latest result into consideration.
305+ # Each key is a PURL and each value is the the highest component id of the
306+ # corresponding PURL, taking advantage of the component id column being auto-incremented.
302307 passed_components : dict [str , int ] = {}
303308
304309 for component_id_string , purl , _ in component_satisfies_policy_facts :
You can’t perform that action at this time.
0 commit comments