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

Class CodeFixV2ViewSet

vulnerabilities/api_v2.py:679–695  ·  view source on GitHub ↗

API endpoint that allows viewing CodeFix entries.

Source from the content-addressed store, hash-verified

677
678
679class CodeFixV2ViewSet(viewsets.ReadOnlyModelViewSet):
680 """
681 API endpoint that allows viewing CodeFix entries.
682 """
683
684 queryset = CodeFixV2.objects.all()
685 serializer_class = CodeFixV2Serializer
686
687 def get_queryset(self):
688 """
689 Optionally filter by vulnerability ID.
690 """
691 queryset = super().get_queryset()
692 advisory_id = self.request.query_params.get("advisory_id")
693 if advisory_id:
694 queryset = queryset.filter(advisory__avid=advisory_id)
695 return queryset
696
697
698class CreateListRetrieveUpdateViewSet(

Callers

nothing calls this directly

Calls 1

allMethod · 0.45

Tested by

no test coverage detected