Commit f47ab30c by ichuang

small fix to xmodule_modifiers to fix case when filename missing

parent 24f85bf2
......@@ -92,7 +92,7 @@ def add_histogram(get_html, module):
if settings.MITX_FEATURES.get('ENABLE_LMS_MIGRATION'):
[filepath, filename] = module.definition.get('filename','')
osfs = module.system.filestore
if osfs.exists(filename):
if filename is not None and osfs.exists(filename):
filepath = filename # if original, unmangled filename exists then use it (github doesn't like symlinks)
data_dir = osfs.root_path.rsplit('/')[-1]
edit_link = "https://github.com/MITx/%s/tree/master/%s" % (data_dir,filepath)
......
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