From 9b0a71bda24784ee97847ebf1f1e953b7a2bfe95 Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Thu, 14 Dec 2023 20:46:20 +0000 Subject: [PATCH] check cvss_v3 for none Signed-off-by: Prabhu Subramanian --- vdb/lib/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdb/lib/__init__.py b/vdb/lib/__init__.py index 612f424..43a9307 100644 --- a/vdb/lib/__init__.py +++ b/vdb/lib/__init__.py @@ -613,8 +613,8 @@ def to_dict(self): "type": self.type, "severity": str(self.severity), "cvss_score": str(self.cvss_score), - "cvss_v3": self.cvss_v3.to_dict() if self.cvss_v3 else "", - "package_issue": self.package_issue.to_dict(), + "cvss_v3": self.cvss_v3.to_dict() if self.cvss_v3 else {}, + "package_issue": self.package_issue.to_dict() if self.package_issue else {}, "short_description": self.short_description, "long_description": self.long_description, "related_urls": self.related_urls,