From dc5ea4306a022395e1c7650ef50c8bec4cb926a1 Mon Sep 17 00:00:00 2001 From: Ross Poulton Date: Sat, 22 Aug 2009 06:29:30 +0000 Subject: [PATCH] Fix issue #98: If a user hadn't set their "Tickets per Page", pagination caused issues. Thanks to dswoods for this patch. --- views/staff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/staff.py b/views/staff.py index b9178d58..5e43b973 100644 --- a/views/staff.py +++ b/views/staff.py @@ -505,7 +505,7 @@ def ticket_list(request): query_params['sortreverse'] = sortreverse ticket_qs = apply_query(Ticket.objects.select_related(), query_params) - ticket_paginator = paginator.Paginator(ticket_qs, request.user.usersettings.settings.get('tickets_per_page', 20)) + ticket_paginator = paginator.Paginator(ticket_qs, request.user.usersettings.settings.get('tickets_per_page') or 20) try: page = int(request.GET.get('page', '1')) except ValueError: