Skip to content

Commit 09943a8

Browse files
committed
Add type check for grouping of individual package
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 6897210 commit 09943a8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎vulnerabilities/pipes/group_advisories.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ def delete_and_save_advisory_set(groups, package, relation=None):
6060
def group_advisory_for_package(
6161
package, logger=None, current_advisory=None, current_advisory_relation=None
6262
):
63+
"""
64+
Group advisories for a given package and save the advisory sets for the package.
65+
"""
66+
from vulnerabilities.utils import TYPES_WITH_MULTIPLE_IMPORTERS
67+
68+
if package.type not in TYPES_WITH_MULTIPLE_IMPORTERS:
69+
return
70+
6371
affecting_advisories = AdvisoryV2.objects.latest_affecting_advisories_for_purl(
6472
purl=package.purl
6573
).prefetch_related(

0 commit comments

Comments
 (0)