From 5854d9a155795c14b005afee1b0bb93d8b659462 Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 1 Aug 2011 12:47:52 +0000 Subject: [PATCH] Resolves OSQA-735, return the object if it doesn't return dict context git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1147 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/views/readers.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/forum/views/readers.py b/forum/views/readers.py index 8dad780..7404b92 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -119,12 +119,18 @@ def tag(request, tag): } # The context returned by the question_list function, contains info about the questions - question_context = dict(question_list(request, + question_context = question_list(request, questions, mark_safe(_(u'questions tagged %(tag)s') % {'tag': tag}), None, mark_safe(_(u'Questions Tagged With %(tag)s') % {'tag': tag}), - False)) + False) + + # If the return data type is not a dict just return it + if not isinstance(question_context, dict): + return question_context + + question_context = dict(question_context) # Create the combined context context = dict(question_context.items() + tag_context.items()) -- 2.39.5