diff --git a/utils/models.py b/utils/models.py index f9844903..99e39448 100644 --- a/utils/models.py +++ b/utils/models.py @@ -8,6 +8,8 @@ class RichTextField(models.TextField): __metaclass__ = models.SubfieldBase def get_prep_value(self, value): + if not value: + return value parser = XssHtml() parser.feed(value) parser.close()