]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/readers.py
Resolves OSQA-735, return the object if it doesn't return dict context
[osqa.git] / forum / views / readers.py
index a16712e2164805193ca44d45adf4245adcc27b36..7404b924c6cd6359ce1b490c4b78a63fbb3552f1 100644 (file)
@@ -126,8 +126,14 @@ def tag(request, tag):
                          mark_safe(_(u'Questions Tagged With %(tag)s') % {'tag': tag}),
                          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, **tag_context)
+    context = dict(question_context.items() + tag_context.items())
 
     return context