]> git.openstreetmap.org Git - osqa.git/commitdiff
Firs answer was always redirecting to page 0.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 7 Jul 2010 10:34:13 +0000 (10:34 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 7 Jul 2010 10:34:13 +0000 (10:34 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@495 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/views/readers.py

index 7bfd75af2a34f054e7a9810c81128d4fd15bc332..9420ce059820e1b6a7f862c938c41033cf281561 100644 (file)
@@ -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))