Mercurial > public > sg101
diff gpp/forums/models.py @ 445:e9f203c5f5bb
Attempting to fix #218; update the topic last visit time with 'now' when viewing the last page of a topic, otherwise use the creation time of the last post on the page.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 08 Jun 2011 00:24:41 +0000 |
parents | c8148cf11a79 |
children | 9d3bd7304050 |
line wrap: on
line diff
--- a/gpp/forums/models.py Sat Jun 04 19:10:34 2011 +0000 +++ b/gpp/forums/models.py Wed Jun 08 00:24:41 2011 +0000 @@ -393,7 +393,7 @@ self.last_visit.strftime('%Y-%m-%d %H:%M:%S')) def save(self, *args, **kwargs): - if self.id is None: + if self.last_visit is None: self.touch() super(TopicLastVisit, self).save(*args, **kwargs)