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 +2
-30
lines changed
Expand file tree Collapse file tree 1 file changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -1315,37 +1315,9 @@ def import_sighting(
13151315
13161316 # Create the sighting
13171317
1318- ### Get the FROM
1319- if from_id in self .mapping_cache :
1320- final_from_id = self .mapping_cache [from_id ]["id" ]
1321- else :
1322- stix_object_result = (
1323- self .opencti .opencti_stix_object_or_stix_relationship .read (id = from_id )
1324- )
1325- if stix_object_result is not None :
1326- final_from_id = stix_object_result ["id" ]
1327- else :
1328- self .opencti .app_logger .error (
1329- "From ref of the sighting not found, doing nothing..."
1330- )
1331- return None
1318+ final_from_id = from_id
1319+ final_to_id = to_id
13321320
1333- ### Get the TO
1334- final_to_id = None
1335- if to_id :
1336- if to_id in self .mapping_cache :
1337- final_to_id = self .mapping_cache [to_id ]["id" ]
1338- else :
1339- stix_object_result = (
1340- self .opencti .opencti_stix_object_or_stix_relationship .read (id = to_id )
1341- )
1342- if stix_object_result is not None :
1343- final_to_id = stix_object_result ["id" ]
1344- else :
1345- self .opencti .app_logger .error (
1346- "To ref of the sighting not found, doing nothing..."
1347- )
1348- return None
13491321 if (
13501322 "x_opencti_negative" not in stix_sighting
13511323 and self .opencti .get_attribute_in_extension ("negative" , stix_sighting )
You can’t perform that action at this time.
0 commit comments