fix: Incorrect expectation of attribute value to be a str

Fix #553
pull/557/head
Raphaël Vinot 2020-03-13 11:02:48 +01:00
parent 8c63ad5d1c
commit 8cf3887d54
1 changed files with 1 additions and 1 deletions

View File

@ -1290,7 +1290,7 @@ class MISPEvent(AbstractMISP):
if ((hasattr(a, 'id') and a.id == attribute_identifier)
or (hasattr(a, 'uuid') and a.uuid == attribute_identifier)
or (hasattr(a, 'value') and attribute_identifier == a.value
or attribute_identifier in a.value.split('|'))):
or (isinstance(a.value, str) and attribute_identifier in a.value.split('|')))):
a.add_tag(tag)
attributes.append(a)