comparison 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
comparison
equal deleted inserted replaced
1063:017e831bbe0c 1064:f0ac48aa8c64
75 self.date_added = datetime.datetime.now() 75 self.date_added = datetime.datetime.now()
76 self.update_date = self.date_added 76 self.update_date = self.date_added
77 else: 77 else:
78 self.update_date = datetime.datetime.now() 78 self.update_date = datetime.datetime.now()
79 79
80 self.html = kwargs.pop('html', None) 80 self.html = kwargs.pop('html', '')
81 if not self.html and self.description: 81 if not self.html and self.description:
82 self.html = site_markup(self.description) 82 self.html = site_markup(self.description)
83 super(DownloadBase, self).save(*args, **kwargs) 83 super(DownloadBase, self).save(*args, **kwargs)
84 84
85 85