File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 2222from rest_framework import viewsets
2323from rest_framework .decorators import action
2424from rest_framework .response import Response
25- from rest_framework .reverse import reverse
2625from rest_framework .throttling import AnonRateThrottle
27- from rest_framework .throttling import UserRateThrottle
2826
2927from vulnerabilities .models import Alias
3028from vulnerabilities .models import Exploit
@@ -369,6 +367,10 @@ def get_fixing_vulnerabilities(self, package) -> dict:
369367 """
370368 Return a mapping of vulnerabilities fixed in the given `package`.
371369 """
370+ # Ghost package should not fix any vulnerability.
371+ if package .is_ghost :
372+ return
373+
372374 return self .get_vulnerabilities_for_a_package (package = package , fix = True )
373375
374376 def get_affected_vulnerabilities (self , package ) -> dict :
@@ -643,7 +645,10 @@ def get_fixed_packages_qs(self):
643645 """
644646 return (
645647 self .get_packages_qs ()
646- .filter (fixingpackagerelatedvulnerability__isnull = False )
648+ .filter (
649+ fixingpackagerelatedvulnerability__isnull = False ,
650+ is_ghost = False ,
651+ )
647652 .with_is_vulnerable ()
648653 )
649654
You can’t perform that action at this time.
0 commit comments