fix default giturl link

This commit is contained in:
ichuang
2013-04-07 00:48:32 +00:00
parent d2768c644e
commit f88b5794e4

View File

@@ -116,7 +116,7 @@ def add_histogram(get_html, module, user):
# doesn't like symlinks)
filepath = filename
data_dir = osfs.root_path.rsplit('/')[-1]
giturl = getattr(module.lms, 'giturl', 'https://github.com/MITx')
giturl = getattr(module.lms, 'giturl', '') or 'https://github.com/MITx'
edit_link = "%s/%s/tree/master/%s" % (giturl, data_dir, filepath)
else:
edit_link = False