Skip to content

Commit

Permalink
refactor:rename paginated variables from reports to documents
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hareshkainthdbt committed Oct 16, 2024
1 parent 95c7ce1 commit 342a787
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions orp/orp_search/public_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 342a787

Please sign in to comment.