Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

Commit

Permalink
when page>1 and page > pages, raise 404
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed May 27, 2012
1 parent 751c6ab commit 0864b78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion july/database.py
Expand Up @@ -234,7 +234,7 @@ def __init__(self, query, page, per_page, total=None):
else:
self.total = query.count()

if self.page > self.pages:
if self.page > 1 and self.page > self.pages:
raise tornado.web.HTTPError(404)

def iter_pages(self, left_edge=2, left_current=2,
Expand Down

0 comments on commit 0864b78

Please sign in to comment.