diff --git a/server/api_server/graphql_helpers.py b/server/api_server/graphql_helpers.py index eeb17641..807c7cc9 100644 --- a/server/api_server/graphql_helpers.py +++ b/server/api_server/graphql_helpers.py @@ -47,7 +47,8 @@ def apply_common_pagination(data, options): # --- PAGINATE --- if options.page is not None and options.limit is not None: effective_limit = min(options.limit, _MAX_LIMIT) - start = (options.page - 1) * effective_limit + page = max(1, options.page) + start = (page - 1) * effective_limit end = start + effective_limit data = data[start:end]