1
0
Fork 0

templatetags/paginator.py: Simplify a chained comparison between operands

Fixes chained-comparison (R1716) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
merge-requests/800/head
Fabian P. Schmidt 2019-11-15 00:08:21 +01:00
parent ca35c99b83
commit 7aeedb6c79
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ def paginator(context, request, adjacent_pages=2):
end_page = paginator.num_pages + 1
# Generate a list of pages to include in the paginator template
page_numbers = [n for n in range(start_page, end_page) if n > 0 and n <= paginator.num_pages]
page_numbers = [n for n in range(start_page, end_page) if 0 < n <= paginator.num_pages]
return {
'page_obj': page_obj,