Allow for no runtime_type in the context.

This commit is contained in:
cahrens
2014-05-02 09:38:37 -04:00
parent ff00fbd1f1
commit c6b96f32a2

View File

@@ -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')