# HG changeset patch # User Brian Neal # Date 1459385951 18000 # Node ID f0ac48aa8c6445c2ba88407891a80803ac44ed34 # Parent 017e831bbe0c172136e88a27eeebf39f1f00246a Fix bug where None could be saved as html field. diff -r 017e831bbe0c -r f0ac48aa8c64 downloads/models.py --- 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) diff -r 017e831bbe0c -r f0ac48aa8c64 gcalendar/forms.py --- a/gcalendar/forms.py Tue Mar 22 20:06:21 2016 -0500 +++ b/gcalendar/forms.py Wed Mar 30 19:59:11 2016 -0500 @@ -125,7 +125,7 @@ def clean_description(self): description = self.cleaned_data['description'] - self.html = None + self.html = '' if description: self.html = site_markup(description, relative_urls=False) try: diff -r 017e831bbe0c -r f0ac48aa8c64 gcalendar/models.py --- a/gcalendar/models.py Tue Mar 22 20:06:21 2016 -0500 +++ b/gcalendar/models.py Wed Mar 30 19:59:11 2016 -0500 @@ -69,7 +69,7 @@ ordering = ('-date_submitted', ) def save(self, *args, **kwargs): - self.html = kwargs.pop('html', None) + self.html = kwargs.pop('html', '') if not self.html and self.description: self.html = site_markup(self.description, relative_urls=False) super(Event, self).save(*args, **kwargs) diff -r 017e831bbe0c -r f0ac48aa8c64 membermap/models.py --- a/membermap/models.py Tue Mar 22 20:06:21 2016 -0500 +++ b/membermap/models.py Wed Mar 30 19:59:11 2016 -0500 @@ -26,7 +26,7 @@ verbose_name_plural = 'map entries' def save(self, *args, **kwargs): - self.html = kwargs.pop('html', None) + self.html = kwargs.pop('html', '') if not self.html and self.message: self.html = site_markup(self.message) self.date_updated = datetime.datetime.now() diff -r 017e831bbe0c -r f0ac48aa8c64 messages/models.py --- 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)