Skip to content

Commit

Permalink
Fix paginating to second page without breadcrumbs. Fantomas42#551
Browse files Browse the repository at this point in the history
  • Loading branch information
jplehmann authored and ghalebkhaled committed Jul 26, 2022
1 parent 881101a commit 541d521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zinnia/breadcrumbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def wrapper(path, model, page, root_name):
path = PAGE_REGEXP.sub('', path)
breadcrumbs = func(path, model, root_name)
if page:
if page.number > 1:
if page.number > 1 and breadcrumbs:
breadcrumbs[-1].url = path
page_crumb = Crumb(_('Page %s') % page.number)
breadcrumbs.append(page_crumb)
Expand Down

0 comments on commit 541d521

Please sign in to comment.