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

Commit 8f22723

Browse files
author
Samuel Hassine
committed
[client] Fix retro-compat with V3
1 parent 41f077d commit 8f22723

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pycti/entities/opencti_attack_pattern.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,12 @@ def import_from_stix2(self, **kwargs):
350350
if "x_opencti_level" in stix_object
351351
else 0
352352
)
353-
353+
if "x_mitre_id" not in stix_object:
354+
stix_object["x_mitre_id"] = (
355+
stix_object["x_opencti_external_id"]
356+
if "x_opencti_external_id" in stix_object
357+
else None
358+
)
354359
return self.create(
355360
stix_id=stix_object["id"],
356361
createdBy=extras["created_by_id"]

0 commit comments

Comments
 (0)