Skip to content
This repository was archived by the owner on Apr 17, 2021. It is now read-only.

Commit 30984d6

Browse files
committed
Merge pull request #12 from bastiao/master
Bug in pagination (first and last links)
2 parents bc4bc6a + fb89224 commit 30984d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bootstrap-pagination/templatetags/bootstrap_pagination.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ def render(self, context):
186186
page_urls.append((curpage, url))
187187

188188
first_page_url = None
189-
if current_page > 1:
189+
if current_page >= 1:
190190
first_page_url = get_page_url(1, context.current_app, url_view_name, url_extra_args, url_extra_kwargs, url_param_name, url_get_params)
191191

192192
last_page_url = None
193-
if current_page < page_count:
193+
if current_page <= page_count:
194194
last_page_url = get_page_url(page_count, context.current_app, url_view_name, url_extra_args, url_extra_kwargs, url_param_name, url_get_params)
195195

196196
previous_page_url = None

0 commit comments

Comments
 (0)