Mercurial > public > sg101
diff messages/models.py @ 1022:82f1f6f905eb
Perform image_check on private messages.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 09 Dec 2015 21:16:04 -0600 |
parents | 4a4fa174a0ec |
children | f0ac48aa8c64 |
line wrap: on
line diff
--- a/messages/models.py Tue Dec 08 21:39:19 2015 -0600 +++ b/messages/models.py Wed Dec 09 21:16:04 2015 -0600 @@ -64,7 +64,10 @@ def save(self, *args, **kwargs): if not self.id: self.send_date = datetime.datetime.now() - self.html = site_markup(self.message) + + self.html = kwargs.pop('html', None) + if not self.html and self.message: + self.html = site_markup(self.message) super(Message, self).save(*args, **kwargs) def __unicode__(self):