From a1cd4496d4d3387ae2818db66a14cfb6e137c072 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 30 Aug 2022 15:00:24 +0100 Subject: [PATCH] feat(chalice): fixed CH pagination --- ee/api/chalicelib/core/sessions_exp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/sessions_exp.py b/ee/api/chalicelib/core/sessions_exp.py index e9e6b0c21..b2bc1186e 100644 --- a/ee/api/chalicelib/core/sessions_exp.py +++ b/ee/api/chalicelib/core/sessions_exp.py @@ -274,7 +274,7 @@ def search_sessions(data: schemas.SessionsSearchPayloadSchema, project_id, user_ meta_keys = metadata.get(project_id=project_id) main_query = cur.format(f"""SELECT any(total) AS count, groupArray(%(sessions_limit)s)(details) AS sessions FROM (SELECT COUNT() OVER () AS total, - rowNumberInAllBlocks() AS rn, + rowNumberInAllBlocks()+1 AS rn, map({SESSION_PROJECTION_COLS_CH_MAP}) AS details {query_part} -- ORDER BY {sort} {data.order}