From: hernani Date: Wed, 7 Jul 2010 10:34:13 +0000 (+0000) Subject: Firs answer was always redirecting to page 0. X-Git-Tag: live~639 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/0239211fee497d6de7927004febadb8eb08891c3 Firs answer was always redirecting to page 0. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@495 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/views/readers.py b/forum/views/readers.py index 7bfd75a..9420ce0 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -303,6 +303,9 @@ def answer_redirect(request, answer): if count % pagesize: page += 1 + + if page == 0: + page = 1 return HttpResponsePermanentRedirect("%s?%s=%s#%s" % ( answer.question.get_absolute_url(), _('page'), page, answer.id))