Only try to update topics if you haven't just set them to None.
This commit is contained in:
parent
ea6ef1dc91
commit
fa6ea8011a
1 changed files with 1 additions and 1 deletions
|
@ -205,7 +205,7 @@ class Topic(models.Model):
|
|||
tracking.last_read = timezone.now()
|
||||
tracking.save()
|
||||
#update topics if exist new post or does't exist in dict
|
||||
if self.last_post_id > tracking.topics.get(str(self.id), 0):
|
||||
elif self.last_post_id > tracking.topics.get(str(self.id), 0):
|
||||
tracking.topics[str(self.id)] = self.last_post_id
|
||||
tracking.save()
|
||||
else:
|
||||
|
|
Reference in a new issue