diff --git a/pytm/pytm.py b/pytm/pytm.py index 3bd7333..f9b7bc3 100644 --- a/pytm/pytm.py +++ b/pytm/pytm.py @@ -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): @@ -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)