Skip to content

Commit

Permalink
fix:add results_count to pagination context
Browse files Browse the repository at this point in the history
Included the total number of results in the pagination context by adding a count of the paginated documents. This ensures that the user interface can display the exact number of results on the current page.
  • Loading branch information
hareshkainthdbt committed Oct 16, 2024
1 parent 4b87570 commit 00217c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions orp/orp_search/public_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def finalise_results(
context["paginator"] = paginator
context["is_paginated"] = paginator.num_pages > 1
context["results"] = paginated_documents
context["results_count"] = len(paginated_documents)
context["results_total_count"] = paginator.count
context["results_page_total"] = paginator.num_pages
context["current_page"] = config.offset
Expand Down

0 comments on commit 00217c6

Please sign in to comment.