Skip to content

Commit

Permalink
feat: also show CVEs per issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fricklerhandwerk authored and RaitoBezarius committed Dec 12, 2023
1 parent 6d23bcc commit a05305f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/website/shared/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ class Meta:

class Serializer(serializers.ModelSerializer):
status = serializers.CharField(source="get_status_display")
cve = serializers.SerializerMethodField()

def get_cve(self, obj: NixpkgsIssue) -> list[str]:
return [cve.cve_id for cve in obj.cve.iterator()]

class Meta:
model = NixpkgsIssue
fields = ["code", "status"]
fields = ["code", "cve", "status"]

filterset_class = Filter

Expand Down

0 comments on commit a05305f

Please sign in to comment.