diff messages/models.py @ 1064:f0ac48aa8c64

Fix bug where None could be saved as html field.
author Brian Neal <bgneal@gmail.com>
date Wed, 30 Mar 2016 19:59:11 -0500
parents 82f1f6f905eb
children
line wrap: on
line diff
--- a/messages/models.py	Tue Mar 22 20:06:21 2016 -0500
+++ b/messages/models.py	Wed Mar 30 19:59:11 2016 -0500
@@ -65,7 +65,7 @@
         if not self.id:
             self.send_date = datetime.datetime.now()
 
-        self.html = kwargs.pop('html', None)
+        self.html = kwargs.pop('html', '')
         if not self.html and self.message:
             self.html = site_markup(self.message)
         super(Message, self).save(*args, **kwargs)