Skip to content

Commit

Permalink
Merge ce48155 into ed75a15
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinPetrow committed Jan 2, 2020
2 parents ed75a15 + ce48155 commit 019eb83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_cool_paginator/templatetags/paginator_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def ellipsis_or_number(context, paginator, current_page):
"""

# Checks is it first page
chosen_page = int(context['request'].GET['page']) if 'page' in context['request'].GET else 1
chosen_page = int(context['request'].GET['page'] or 1) if 'page' in context['request'].GET else 1

if current_page in (chosen_page + 1, chosen_page + 2, chosen_page - 1, chosen_page - 2,
paginator.num_pages, paginator.num_pages - 1, 1, 2, chosen_page):
Expand Down

0 comments on commit 019eb83

Please sign in to comment.