Skip to content

Commit c07c61f

Browse files
[client] prevent export list from ordering by _score (#733)
1 parent 3f6fbb4 commit c07c61f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,6 +2280,12 @@ def export_entities_list(
22802280
do_list = lister.get(
22812281
entity_type, lambda **kwargs: self.unknown_type({"type": entity_type})
22822282
)
2283+
2284+
if getAll and (orderBy is None or orderBy == "_score"):
2285+
orderBy = "created_at"
2286+
if orderMode is None:
2287+
orderMode = "desc"
2288+
22832289
# noinspection PyTypeChecker
22842290
return do_list(
22852291
search=search,

0 commit comments

Comments
 (0)