From f47ab30c3f930244fa44efad0e90fb22c86f90c7 Mon Sep 17 00:00:00 2001 From: ichuang Date: Mon, 6 Aug 2012 18:34:54 -0400 Subject: [PATCH] small fix to xmodule_modifiers to fix case when filename missing --- common/djangoapps/xmodule_modifiers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index 843d2eaa38..597d74ce6f 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -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)