Fixes other mapping to other types

pull/409/head
0x3c7 2019-06-19 07:38:15 +02:00
parent efd8b80adb
commit 42a3dcf704
No known key found for this signature in database
GPG Key ID: EFBE1131B58AFF51
1 changed files with 4 additions and 3 deletions

View File

@ -218,11 +218,12 @@ def set_values(value1, value2=None):
compositeMapping = '{}|{}'.format(value1.find('context')['search'], value2.find('context')['search']) compositeMapping = '{}|{}'.format(value1.find('context')['search'], value2.find('context')['search'])
mapping = get_mapping(compositeMapping, mappingDict=iocMispCompositeMapping) mapping = get_mapping(compositeMapping, mappingDict=iocMispCompositeMapping)
else: else:
context_search = value1.find('context')['search']
content_type = value1.find('content').get('type', None) content_type = value1.find('content').get('type', None)
if content_type: if "RouteEntryItem/Destination" in context_search and content_type:
mapping = get_mapping(value1.find('context')['search'] + '/' + content_type) mapping = get_mapping(context_search + '/' + content_type)
else: else:
mapping = get_mapping(value1.find('context')['search']) mapping = get_mapping(context_search)
if mapping: if mapping:
attribute_values.update(mapping) attribute_values.update(mapping)