Skip to content

Commit a241281

Browse files
committed
Optimise package details
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent bfbb1a6 commit a241281

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

vulnerabilities/templates/packages_v2.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
<th style="width: 225px;">
4141
<span
4242
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
43-
data-tooltip="This is the number of vulnerabilities that affect the package.">
43+
data-tooltip="This is the status of the package. If it is vulnerable, it means that there are known vulnerabilities associated with this package.">
4444
Vulnerable
4545
</span>
4646
</th>
4747
<th style="width: 225px;">
4848
<span
4949
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
50-
data-tooltip="This is the number of vulnerabilities fixed by the package.">
50+
data-tooltip="This is the risk score of the package based on its vulnerabilities.">
5151
Risk Score
5252
</span>
5353
</th>

vulnerabilities/views.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def get_context_data(self, **kwargs):
179179

180180
def get_queryset(self):
181181
purl = self.kwargs.get("purl")
182-
print(purl)
183182
return models.AdvisoryV2.objects.latest_affecting_advisories_for_purl(purl)
184183

185184

@@ -262,22 +261,6 @@ def get_context_data(self, **kwargs):
262261

263262
return context
264263

265-
def get_queryset(self):
266-
return (
267-
super()
268-
.get_queryset()
269-
.prefetch_related(
270-
Prefetch(
271-
"affected_in_impacts",
272-
queryset=ImpactedPackage.objects.select_related("advisory"),
273-
),
274-
Prefetch(
275-
"fixed_in_impacts",
276-
queryset=ImpactedPackage.objects.select_related("advisory"),
277-
),
278-
)
279-
)
280-
281264
def get_object(self, queryset=None):
282265
if queryset is None:
283266
queryset = self.get_queryset()

0 commit comments

Comments
 (0)