Permalink
Browse files

Avoid behaviour change by raising Http404 for invalid page numbers

An earlier version of this branch would always display the first page in this
case. For compatibility we now simply return 404.
  • Loading branch information...
1 parent 4e0140c commit 4b087be5c22f0be08dc13a79b5734db508f470c0 @acdha acdha committed Dec 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 haystack/views.py
View
@@ -99,7 +99,7 @@ def build_page(self):
try:
page_no = int(self.request.GET.get('page', 1))
except (TypeError, ValueError):
- page_no = 1
+ raise Http404
start_offset = (page_no - 1) * self.results_per_page
self.results[start_offset:start_offset + self.results_per_page]

0 comments on commit 4b087be

Please sign in to comment.