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

Commit c5ba248

Browse files
author
Samuel Hassine
committed
[client] Fix export empty field
1 parent a6ad73b commit c5ba248

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,10 @@ def generate_export(self, entity: Dict) -> Dict:
10101010
external_reference["external_id"] = entity_external_reference[
10111011
"external_id"
10121012
]
1013-
if "importFiles" in entity_external_reference and len(entity_external_reference["importFiles"]) > 0:
1013+
if (
1014+
"importFiles" in entity_external_reference
1015+
and len(entity_external_reference["importFiles"]) > 0
1016+
):
10141017
external_reference["x_opencti_files"] = []
10151018
for file in entity_external_reference["importFiles"]:
10161019
url = (

0 commit comments

Comments
 (0)