X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/700b6dec7e4d655fee91e26f9757442162047281..ee7cd8daedc243f04e5f619b94239371c87e0fcc:/forum/views/readers.py diff --git a/forum/views/readers.py b/forum/views/readers.py index a7906fa..1c4dfcc 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -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")) @@ -159,8 +159,8 @@ def question_list(request, initial, if request.GET.get("q"): keywords = request.GET.get("q").strip() - answer_count = Answer.objects.filter_state(deleted=False).filter(parent__in=questions).count() - answer_description = _("answers") + #answer_count = Answer.objects.filter_state(deleted=False).filter(parent__in=questions).count() + #answer_description = _("answers") if not feed_url: req_params = "&".join(["%s=%s" % (k, v) for k, v in request.GET.items() if not k in (_('page'), _('pagesize'), _('sort'))]) @@ -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,