Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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