Skip to content

Commit 894c40d

Browse files
committed
Add unique SSVC trees only
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent abe2af8 commit 894c40d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vulnerabilities/api_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def get_affected_by_vulnerabilities(self, package):
261261
"related_ssvcs",
262262
queryset=SSVC.objects.select_related("source_advisory").only(
263263
"id", "decision", "options", "vector", "source_advisory__url"
264-
),
264+
).distinct("source_advisory__url"),
265265
to_attr="prefetched_ssvc_trees",
266266
),
267267
)
@@ -649,7 +649,7 @@ def get_affected_advisories_bulk(packages):
649649
"decision",
650650
"vector",
651651
"source_advisory__url",
652-
),
652+
).distinct("source_advisory__url"),
653653
to_attr="prefetched_ssvc_trees",
654654
)
655655
),

0 commit comments

Comments
 (0)