Commit e7401afa authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'fix/photos-more-than-7-pages' into 'master'

Fix photos index view if more than 7 pages exist

See merge request !661
parents 76c3a20b de72703f
......@@ -54,9 +54,11 @@ def index(request):
except PageNotAnInteger:
# If page is not an integer, deliver first page.
albums =
page = 1
except EmptyPage:
# If page is out of range (e.g. 9999), deliver last page of results.
albums =
page = paginator.num_pages
page_range = range(1, paginator.num_pages + 1)
if paginator.num_pages > 7:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment