fix: [stix import] Made sure the header description value fetching test is working is all cases

pull/3924/head
chrisr3d 2018-12-06 11:40:19 +01:00
parent 0469b4848d
commit c633fb3c12
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 1 additions and 1 deletions

View File

@ -963,7 +963,7 @@ class ExternalStixParser(StixParser):
self.set_timestamp_and_date()
self.set_event_info()
header = self.event.stix_header
if hasattr(header, 'description') and hasattr(header.description, 'value'):
if hasattr(header, 'description') and hasattr(header.description, 'value') and header.description.value:
self.misp_event.add_attribute(**{'type': 'comment', 'value': header.description.value,
'comment': 'Imported from STIX header description'})
if hasattr(header, 'handling') and header.handling: