MCPcopy Index your code
hub / github.com/aboutcode-org/vulnerablecode / get_queryset

Method get_queryset

vulnerabilities/api_v2.py:666–676  ·  view source on GitHub ↗

Optionally filter by vulnerability ID.

(self)

Source from the content-addressed store, hash-verified

664 throttle_classes = [AnonRateThrottle, PermissionBasedUserRateThrottle]
665
666 def get_queryset(self):
667 """
668 Optionally filter by vulnerability ID.
669 """
670 queryset = super().get_queryset()
671 vulnerability_id = self.request.query_params.get("vulnerability_id")
672 if vulnerability_id:
673 queryset = queryset.filter(
674 affected_package_vulnerability__vulnerability__vulnerability_id=vulnerability_id
675 )
676 return queryset
677
678
679class CodeFixV2ViewSet(viewsets.ReadOnlyModelViewSet):

Callers 3

get_querysetMethod · 0.45
get_querysetMethod · 0.45
get_querysetMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected