From 22b5111365dbb7eefb540e884fbb3f5c878b8fbd Mon Sep 17 00:00:00 2001 From: Tom Price Date: Thu, 31 Mar 2016 00:09:59 +0100 Subject: [PATCH] Fix for failing test in e0d56e --- RIGS/templatetags/markdown_tags.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RIGS/templatetags/markdown_tags.py b/RIGS/templatetags/markdown_tags.py index 8aa8beb7..9abd1054 100644 --- a/RIGS/templatetags/markdown_tags.py +++ b/RIGS/templatetags/markdown_tags.py @@ -9,6 +9,9 @@ register = template.Library() @register.filter(name="markdown") def markdown_filter(text, format='html'): + # markdown library can't handle text=None + if text is None: + return text html = markdown.markdown(text) if format == 'html': return mark_safe('
' + html + '
')