Mercurial > public > sg101
comparison gcalendar/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 | 68c3343f3318 |
children |
comparison
equal
deleted
inserted
replaced
1063:017e831bbe0c | 1064:f0ac48aa8c64 |
---|---|
67 | 67 |
68 class Meta: | 68 class Meta: |
69 ordering = ('-date_submitted', ) | 69 ordering = ('-date_submitted', ) |
70 | 70 |
71 def save(self, *args, **kwargs): | 71 def save(self, *args, **kwargs): |
72 self.html = kwargs.pop('html', None) | 72 self.html = kwargs.pop('html', '') |
73 if not self.html and self.description: | 73 if not self.html and self.description: |
74 self.html = site_markup(self.description, relative_urls=False) | 74 self.html = site_markup(self.description, relative_urls=False) |
75 super(Event, self).save(*args, **kwargs) | 75 super(Event, self).save(*args, **kwargs) |
76 | 76 |
77 def is_approved(self): | 77 def is_approved(self): |