Skip to content
Snippets Groups Projects
Commit 926763a3 authored by ichuang's avatar ichuang
Browse files

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

Edit link fix
parents ff5773c0 6dfbb222
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment