Major redesign #73

Merged
lukas merged 45 commits from manage-purchases into main 2024-09-02 15:47:44 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 3abd4c4af9 - Show all commits

View File

@ -20,7 +20,7 @@ def list_purchases(request: HttpRequest) -> HttpResponse:
purchases = Purchase.objects.order_by("-date_purchased") purchases = Purchase.objects.order_by("-date_purchased")
page_obj = None page_obj = None
if int(limit) != 0: if int(limit) != 0:
paginator = Paginator(Purchase.objects.order_by("-date_purchased"), limit) paginator = Paginator(purchases, limit)
page_obj = paginator.get_page(page_number) page_obj = paginator.get_page(page_number)
purchases = page_obj.object_list purchases = page_obj.object_list