This repository was archived by the owner on Dec 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1299,14 +1299,18 @@ def prepare_export(
12991299 return result
13001300 elif mode == "full" :
13011301 # Get extra relations
1302- stix_relations = self .opencti .stix_relation .list (fromId = entity ["id" ])
1302+ stix_relations = self .opencti .stix_relation .list (fromId = entity ["id" ], forceNatural = True )
13031303 for stix_relation in stix_relations :
13041304 if self .check_max_marking_definition (
13051305 max_marking_definition_entity , stix_relation ["markingDefinitions" ]
13061306 ):
1307- objects_to_get .append (stix_relation ["to" ])
1308- if stix_relation ["to" ]["stix_id_key" ] in observables_stix_ids :
1309- stix_relation ["to" ]["stix_id_key" ] = observable_object_data [
1307+ if stix_relation ["to" ]["id" ] == entity ["id" ]:
1308+ other_side_entity = stix_relation ["from" ]
1309+ else :
1310+ other_side_entity = stix_relation ["to" ]
1311+ objects_to_get .append (other_side_entity )
1312+ if other_side_entity ["stix_id_key" ] in observables_stix_ids :
1313+ other_side_entity ["stix_id_key" ] = observable_object_data [
13101314 "observedData"
13111315 ]["id" ]
13121316 relation_object_data = self .opencti .stix_relation .to_stix2 (
You can’t perform that action at this time.
0 commit comments