From 342a787f9aaf52125b00a67a6fd93777177022c8 Mon Sep 17 00:00:00 2001 From: Haresh Kainth Date: Wed, 16 Oct 2024 10:04:56 +0100 Subject: [PATCH] refactor:rename paginated variables from reports to documents Updated variable names from 'paginated_reports' to 'paginated_documents' for consistency and clarity in the pagination context. This change ensures that the nomenclature better reflects the content being paginated. --- orp/orp_search/public_gateway.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/orp/orp_search/public_gateway.py b/orp/orp_search/public_gateway.py index d1da0bb..82293f5 100644 --- a/orp/orp_search/public_gateway.py +++ b/orp/orp_search/public_gateway.py @@ -65,13 +65,13 @@ def paginate_results( """ paginator = Paginator(results, config.limit) try: - paginated_reports = paginator.page(config.offset) + paginated_documents = paginator.page(config.offset) except InvalidPage: - paginated_reports = paginator.page(1) + paginated_documents = paginator.page(1) context["is_paginated"] = paginator.num_pages > 1 - context["reports"] = paginated_reports + context["documents"] = paginated_documents context["paginator"] = paginator - context["page_obj"] = paginated_reports + context["page_obj"] = paginated_documents return context, paginator def calculate_total_pages(self, config, results_count):