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

Commit 1159e89

Browse files
author
Samuel Hassine
committed
[client] Handle generic list export
1 parent 1453a37 commit 1159e89

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,13 +1027,13 @@ def prepare_export(
10271027
if "createdBy" in entity:
10281028
del entity["createdBy"]
10291029
del entity["createdById"]
1030+
if "observables" in entity:
1031+
del entity["observables"]
1032+
if "observablesIds" in entity:
1033+
del entity["observablesIds"]
10301034

10311035
entity_copy = entity.copy()
10321036
if no_custom_attributes:
1033-
if "observables" in entity:
1034-
del entity["observables"]
1035-
if "observablesIds" in entity:
1036-
del entity["observablesIds"]
10371037
if "external_references" in entity:
10381038
del entity["external_references"]
10391039
for key in entity_copy.keys():
@@ -1426,6 +1426,7 @@ def export_list(
14261426

14271427
# List
14281428
lister = {
1429+
"Stix-Domain-Object": self.opencti.stix_domain_object.list,
14291430
"Attack-Pattern": self.opencti.attack_pattern.list,
14301431
"Campaign": self.opencti.campaign.list,
14311432
"Note": self.opencti.note.list,

0 commit comments

Comments
 (0)