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

Commit c15d313

Browse files
committed
[client] operation fix
1 parent 6ae5175 commit c15d313

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,11 +2554,11 @@ def element_operation_delete(self, item, operation):
25542554
def apply_opencti_operation(self, item, operation):
25552555
if operation == "delete" or operation == "delete_force":
25562556
self.element_operation_delete(item=item, operation=operation)
2557-
elif item["opencti_operation"] == "revert_draft":
2557+
elif operation == "revert_draft":
25582558
self.opencti.stix_core_object.remove_from_draft(id=item["id"])
2559-
elif item["opencti_operation"] == "restore":
2559+
elif operation == "restore":
25602560
self.opencti.trash.restore(item["id"])
2561-
elif item["opencti_operation"] == "merge":
2561+
elif operation == "merge":
25622562
target_id = self.opencti.get_attribute_in_extension("merge_target_id", item)
25632563
if target_id is None:
25642564
target_id = item["merge_target_id"]
@@ -2592,7 +2592,7 @@ def apply_opencti_operation(self, item, operation):
25922592
self.opencti.stix_core_object.clear_access_restriction(
25932593
element_id=item["id"]
25942594
)
2595-
elif item["opencti_operation"] == "enrichment":
2595+
elif operation == "enrichment":
25962596
connector_ids = self.opencti.get_attribute_in_extension(
25972597
"connector_ids", item
25982598
)

0 commit comments

Comments
 (0)