]> git.openstreetmap.org Git - osqa.git/commitdiff
We exclude the deleted comments from the queryset when redirecting to the newly added...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 29 Dec 2010 22:04:00 +0000 (22:04 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 29 Dec 2010 22:04:00 +0000 (22:04 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@654 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/views/readers.py

index fbc0ed19233f8dbdc42f1a53d6ec15c0a3c4c510..e0929220b6b0dfa5d9f3a1967d71b0b18ba42b45 100644 (file)
@@ -267,7 +267,7 @@ def answer_redirect(request, answer):
     else:
         raise Http404()
 
     else:
         raise Http404()
 
-    count = answer.question.answers.filter(Q(marked=True) | filter).count()
+    count = answer.question.answers.filter(Q(marked=True) | filter).exclude(state_string="(deleted)").count()
     pagesize = pc.pagesize(request)
 
     page = count / pagesize
     pagesize = pc.pagesize(request)
 
     page = count / pagesize