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

Commit 755ba30

Browse files
[client] add draft_id header handling (opencti/6577)
1 parent 6e6fddb commit 755ba30

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pycti/api/opencti_api_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ def set_playbook_id_header(self, playbook_id):
213213
def set_event_id(self, event_id):
214214
self.request_headers["opencti-event-id"] = event_id
215215

216+
def set_draft_id(self, draft_id):
217+
self.request_headers["opencti-draft-id"] = draft_id
218+
216219
def set_synchronized_upsert_header(self, synchronized):
217220
self.request_headers["synchronized-upsert"] = (
218221
"true" if synchronized is True else "false"

pycti/utils/opencti_stix2.py

Lines changed: 1 addition & 1 deletion
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)

0 commit comments

Comments
 (0)