Permalink
Browse files

last_post.id changed to last_post_id

  • Loading branch information...
1 parent 61d28c3 commit e2cfc7269bf585ce08e68e6768c0d98556c17199 @yanchenko-igor yanchenko-igor committed Feb 16, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 djangobb_forum/models.py
  2. +1 −1 djangobb_forum/templatetags/forum_extras.py
View
@@ -185,12 +185,12 @@ def update_read(self, user):
tracking.last_read = datetime.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):
- tracking.topics[str(self.id)] = self.last_post.id
+ if self.last_post_id > tracking.topics.get(str(self.id), 0):
+ tracking.topics[str(self.id)] = self.last_post_id
tracking.save()
else:
#initialize topic tracking dict
- tracking.topics = {self.id: self.last_post.id}
+ tracking.topics = {self.id: self.last_post_id}
tracking.save()
@@ -146,7 +146,7 @@ def has_unreads(topic, user):
return False
else:
if isinstance(user.posttracking.topics, dict):
- if topic.last_post.id > user.posttracking.topics.get(str(topic.id), 0):
+ if topic.last_post_id > user.posttracking.topics.get(str(topic.id), 0):
return True
else:
return False

0 comments on commit e2cfc72

Please sign in to comment.