Skip to content

Commit

Permalink
Search from alias in UI
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Goel <[email protected]>
  • Loading branch information
TG1999 committed Jun 15, 2022
1 parent 5b56e9e commit 8d626e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vulnerabilities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def get(self, request):
def request_to_vulnerabilities(request):
vuln_id = request.GET["vuln_id"]
return list(
models.Vulnerability.objects.filter(vulnerability_id=vuln_id).annotate(
models.Vulnerability.objects.filter(
Q(vulnerability_id=vuln_id) | Q(aliases__alias__icontains=vuln_id)
).annotate(
vulnerable_package_count=Count(
"packages", filter=Q(packagerelatedvulnerability__fix=False)
),
Expand Down

0 comments on commit 8d626e2

Please sign in to comment.