fix: [stix2 import] Avoid error on fetching relationship by uuid

- Fixes an issue that did not put (for instance)
  Galaxies on attribute level within the attribute
  because of the uuid fetching error
pull/3995/head
chrisr3d 2019-01-07 11:04:54 +01:00
parent 755935d294
commit 735bd72e9e
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ class StixParser():
if uuid in self.relationship:
galaxies = []
for reference in self.relationship[uuid]:
target = reference.target_ref
target = reference.target_ref.split('--')[1]
if target in self.galaxy:
galaxy = self.galaxy[target]
galaxies.append(self.parse_external_galaxy(galaxy['object']))