Export to GitHub

django-pagination - issue #8

AttributeError when out of range


Posted on Jul 28, 2008 by Happy Dog

What steps will reproduce the problem? 1. {% autopaginate object_list 10 %} + {% paginate %} 2. only 9 objects 3. got to ?page=2 or 0, only 1 works

What is the expected output? What do you see instead? 'NoneType' object has no attribute 'page_range' the error only occurs when i use {% paginate %}

What version of the product are you using? On what operating system? svn from today (28.7.2008)

Please provide any additional information below. this is not a crucial bug, but imho a site should be safe against wrong GET paramters ;)) except this little but, a very nice piece of software. thanks!

Comment #1

Posted on Oct 24, 2008 by Happy Kangaroo

This should no longer be a problem, and in r40 it for sure won't be a problem :) Thanks for the bug report, you rock!

Comment #2

Posted on Aug 27, 2009 by Swift Dog

Actually it should be like this:

except (KeyError, AttributeError):

Could you fix it, please?

Comment #3

Posted on Aug 27, 2009 by Swift Dog

Attaching a patch! :)

Attachments

Status: Fixed

Labels:
Type-Defect Priority-Medium