From ac92993ba5c5ff3ffc5963fb4a0716aa56413837 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 10 Feb 2022 19:06:01 +0100 Subject: [PATCH] feat(api): EE errors limit returned results --- ee/api/chalicelib/core/errors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/errors.py b/ee/api/chalicelib/core/errors.py index 0519bb143..b25efee7b 100644 --- a/ee/api/chalicelib/core/errors.py +++ b/ee/api/chalicelib/core/errors.py @@ -509,7 +509,8 @@ def search(data, project_id, user_id, flows=False, status="ALL", favorite_only=F FROM errors WHERE {" AND ".join(ch_sub_query)} GROUP BY error_id, name, message - ORDER BY {sort} {order}) AS details INNER JOIN (SELECT error_id AS error_id, toUnixTimestamp(MAX(datetime))*1000 AS last_occurrence, toUnixTimestamp(MIN(datetime))*1000 AS first_occurrence + ORDER BY {sort} {order} + LIMIT 1001) AS details INNER JOIN (SELECT error_id AS error_id, toUnixTimestamp(MAX(datetime))*1000 AS last_occurrence, toUnixTimestamp(MIN(datetime))*1000 AS first_occurrence FROM errors GROUP BY error_id) AS time_details ON details.error_id=time_details.error_id