From f621f6ac002a7a9ca3146d85b25c3a5ca64c768f Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Tue, 19 Nov 2024 13:57:55 +0100 Subject: [PATCH] Dev (#2762) * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * feat(chalice): autocomplete return top 10 with stats * fix(chalice): fixed autocomplete top 10 meta-filters * fix(chalice): fixed metrics sort --- ee/api/chalicelib/core/sessions_exp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/api/chalicelib/core/sessions_exp.py b/ee/api/chalicelib/core/sessions_exp.py index ab9028fc8..78124c923 100644 --- a/ee/api/chalicelib/core/sessions_exp.py +++ b/ee/api/chalicelib/core/sessions_exp.py @@ -451,7 +451,7 @@ def search2_table(data: schemas.SessionsSearchPayloadSchema, project_id: int, de {query_part}) AS filtred_sessions {extra_where} GROUP BY {main_col} - ORDER BY total_count DESC + ORDER BY total DESC LIMIT %(limit_e)s OFFSET %(limit_s)s;""" else: main_query = f"""SELECT COUNT(DISTINCT {main_col}) OVER () AS main_count, @@ -464,7 +464,7 @@ def search2_table(data: schemas.SessionsSearchPayloadSchema, project_id: int, de AND user_id != '') AS filtred_sessions {extra_where} GROUP BY {main_col} - ORDER BY total_count DESC + ORDER BY total DESC LIMIT %(limit_e)s OFFSET %(limit_s)s;""" main_query = cur.format(main_query, full_args)