Use Paginator.get_page instead of Paginator.page

Avoid error on empty page
This commit is contained in:
Yingtong Li 2023-05-02 20:59:50 +10:00
parent 603e276bac
commit bd43db4e21
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -233,7 +233,7 @@ def budget_list(request):
budgets_filtered.append(revision)
paginator = Paginator(budgets_filtered, 100)
page = paginator.page(int(request.GET.get('page', '1')))
page = paginator.get_page(int(request.GET.get('page', '1')))
# Categorise budgets
budgets_action = []
@ -603,7 +603,7 @@ def claim_list(request):
claims_filtered.append(claim)
paginator = Paginator(claims_filtered, 100)
page = paginator.page(int(request.GET.get('page', '1')))
page = paginator.get_page(int(request.GET.get('page', '1')))
# Categorise claims
claims_action = []