Skip to content

Commit

Permalink
'forum' abstract models updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ellmetha committed Mar 7, 2015
1 parent 36c0c89 commit b02bc6e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions machina/apps/forum/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,8 @@ def update_trackers(self):
topics = topic_klass.objects.filter(forum__id__in=forum_ids).order_by('-updated')
approved_topics = topics.filter(approved=True)

self.real_topics_count = topics.count()
self.topics_count = approved_topics.count()
# Compute the forum level posts count
# Compute the forum level posts count (only approved posts are recorded)
posts_count = sum(topic.posts_count for topic in topics)
self.posts_count = posts_count

Expand Down

0 comments on commit b02bc6e

Please sign in to comment.