Skip to content

Commit

Permalink
Fix cvss and response overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Dakes committed Jun 18, 2024
1 parent b0c4388 commit 69aa0a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytm/pytm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,8 @@ def encode_threat_data(obj):
"threat_id",
"references",
"condition",
"cvss",
"response",
]

if type(obj) is Finding or (len(obj) != 0 and type(obj[0]) is Finding):
Expand All @@ -2039,7 +2041,8 @@ def encode_threat_data(obj):
# ignore missing attributes, since this can be called
# on both a Finding and a Threat
continue
setattr(t, a, html.escape(v))
if v is not None:
setattr(t, a, html.escape(v))

encoded_threat_data.append(t)

Expand Down

0 comments on commit 69aa0a6

Please sign in to comment.