Commit 005599aa by Carson Gee

Merge pull request #4 from mitocw/bugfix/ichuang/custom_tag_workaround

workaround for custom_tag being broken in residential MITx
parents 4eb004aa 091536ed
...@@ -55,7 +55,10 @@ class CustomTagDescriptor(RawDescriptor): ...@@ -55,7 +55,10 @@ class CustomTagDescriptor(RawDescriptor):
# cdodge: look up the template as a module # cdodge: look up the template as a module
template_loc = self.location.replace(category='custom_tag_template', name=template_name) template_loc = self.location.replace(category='custom_tag_template', name=template_name)
try:
template_module = system.load_item(template_loc) template_module = system.load_item(template_loc)
except:
template_module = system.load_item(template_loc.for_branch('draft'))
template_module_data = template_module.data template_module_data = template_module.data
template = Template(template_module_data) template = Template(template_module_data)
return template.render(**params) return template.render(**params)
......
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