]> git.openstreetmap.org Git - osqa.git/commitdiff
Fixes bad sorting on unanswered tab.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 27 Jul 2010 10:27:09 +0000 (10:27 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 27 Jul 2010 10:27:09 +0000 (10:27 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@553 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/views/readers.py

index a7906fa8389e4a1ca72bdae1174f38ed7da9bd2d..258bbc4b6f1b37ab3fd741341a2dac9c317cdab8 100644 (file)
@@ -90,7 +90,7 @@ def index(request):
 @decorators.render('questions.html', 'unanswered', _('unanswered'), weight=400)
 def unanswered(request):
     return question_list(request,
-                         Question.objects.filter(extra_ref=None),
+                         Question.objects.exclude(id__in=Question.objects.filter(children__marked=True).distinct()),
                          _('open questions without an accepted answer'),
                          None,
                          _("Unanswered Questions"))
@@ -170,7 +170,7 @@ def question_list(request, initial,
         feed_url = mark_safe(request.path + "?type=rss" + req_params)
 
     return pagination.paginated(request, ('questions', paginator_context or QuestionListPaginatorContext()), {
-    "questions" : questions,
+    "questions" : questions.distinct(),
     "questions_count" : questions.count(),
     "keywords" : keywords,
     "list_description": list_description,