Commit c6b96f32 by cahrens

Allow for no runtime_type in the context.

parent ff00fbd1
......@@ -18,7 +18,7 @@ class VerticalModule(VerticalFields, XModule):
def student_view(self, context):
# When rendering a Studio preview, use a different template to support drag and drop.
if context and context['runtime_type'] == 'studio':
if context and context.get('runtime_type', None) == 'studio':
return self.studio_preview_view(context)
return self.render_view(context, 'vert_module.html')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment