Make the markdown attribute default to None, to distinguish it from the empty string

This commit is contained in:
Calen Pennington
2013-03-12 10:50:14 -04:00
parent 1411fadd28
commit f6b4d3aa46
2 changed files with 3 additions and 3 deletions

View File

@@ -801,7 +801,7 @@ class CapaDescriptor(RawDescriptor):
module_class = CapaModule
weight = StringyFloat(help="How much to weight this problem by", scope=Scope.settings)
markdown = String(help="Markdown source of this module", scope=Scope.settings, default='')
markdown = String(help="Markdown source of this module", scope=Scope.settings)
stores_state = True
has_score = True
@@ -824,7 +824,7 @@ class CapaDescriptor(RawDescriptor):
def get_context(self):
_context = RawDescriptor.get_context(self)
_context.update({'markdown': self.markdown,
'enable_markdown' : self.markdown != ''})
'enable_markdown': self.markdown is not None})
return _context
@property