From e3ef9993a0f4a4726ae21d0f07f7e6dfd3216339 Mon Sep 17 00:00:00 2001 From: Ibrahim Awwal Date: Mon, 10 Sep 2012 20:35:06 -0700 Subject: [PATCH] Fix context for posts that don't have it. --- lms/djangoapps/django_comment_client/forum/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 560e19a97b..e77e11066b 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -248,7 +248,8 @@ def single_thread(request, course_id, discussion_id, thread_id): # TODO: Remove completely or switch back to server side rendering html = render_to_string('discussion/_ajax_single_thread.html', context) content = utils.safe_content(thread.to_dict()) - content.update(courseware_context) + if courseware_context: + content.update(courseware_context) return utils.JsonResponse({ 'html': html, 'content': content,