Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 2b82017

Browse files
[client] Fix if/elfif operation to prevent unwanted stack
1 parent 6a084e9 commit 2b82017

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,7 +2390,7 @@ def import_item(
23902390
if item["opencti_operation"] == "delete":
23912391
delete_id = item["id"]
23922392
self.opencti.stix.delete(id=delete_id)
2393-
if item["opencti_operation"] == "merge":
2393+
elif item["opencti_operation"] == "merge":
23942394
target_id = item["merge_target_id"]
23952395
source_ids = item["merge_source_ids"]
23962396
self.opencti.stix.merge(id=target_id, object_ids=source_ids)
@@ -2429,7 +2429,6 @@ def import_item(
24292429
item, observed_data_ref, to_id, update
24302430
)
24312431
# endregion
2432-
24332432
elif item["type"] == "label":
24342433
stix_ids = self.opencti.get_attribute_in_extension("stix_ids", item)
24352434
self.opencti.label.create(

0 commit comments

Comments
 (0)