Commit 926763a3 by ichuang

Merge pull request #351 from MITx/edit-link-fix

Edit link fix
parents ff5773c0 6dfbb222
......@@ -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