From 5eaa9ceeeebfd548bbec7cb59cebad47ccf5d306 Mon Sep 17 00:00:00 2001 From: "John M. Horan" Date: Fri, 27 Oct 2023 18:49:47 -0700 Subject: [PATCH] Append inside the if condition #1228 Reference: https://github.com/nexB/vulnerablecode/issues/1228 Signed-off-by: John M. Horan --- vulnerabilities/api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vulnerabilities/api.py b/vulnerabilities/api.py index 25470e7f4..4abec7532 100644 --- a/vulnerabilities/api.py +++ b/vulnerabilities/api.py @@ -62,8 +62,7 @@ def get_vulnerability(self, vuln, affected_vulnerabilities): if vuln.get("vulnerability"): affected_vulnerability["vulnerability"] = vuln.get("vulnerability").vulnerability_id - - affected_vulnerabilities.append(affected_vulnerability) + affected_vulnerabilities.append(affected_vulnerability) affected_by_vulnerabilities = serializers.SerializerMethodField("get_affected_vulnerabilities")