diff downloads/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 eeaf387803c6
children
line wrap: on
line diff
--- a/downloads/models.py	Tue Mar 22 20:06:21 2016 -0500
+++ b/downloads/models.py	Wed Mar 30 19:59:11 2016 -0500
@@ -77,7 +77,7 @@
         else:
             self.update_date = datetime.datetime.now()
 
-        self.html = kwargs.pop('html', None)
+        self.html = kwargs.pop('html', '')
         if not self.html and self.description:
             self.html = site_markup(self.description)
         super(DownloadBase, self).save(*args, **kwargs)