Fix misp API response content parsing

pull/749/head
Silvian I 2021-05-27 11:31:16 +02:00
parent 889fa44e19
commit 650c87a534
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ attr_cnt_duplicate = 0
attr_cnt_changed = 0
yara_rules = []
yara_rule_names = []
if 'response' in result and 'Attribute' in result['response']:
for attribute in result['response']['Attribute']:
if result.get('Attribute'):
for attribute in result.get('Attribute'):
value = attribute['value']
event_id = attribute['event_id']
attribute_id = attribute['id']