Browse Source

Fix Forum#recalculate

Alec Nikolas Reiter 7 years ago
parent
commit
ea9ed609e2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      flaskbb/forum/models.py

+ 1 - 1
flaskbb/forum/models.py

@@ -964,7 +964,7 @@ class Forum(db.Model, CRUDMixin):
         :param last_post: If set to ``True`` it will also try to update
                           the last post columns in the forum.
         """
-        topic_count = Topic.query.filter(Forum.id == self.id, Topic.hidden != True).count()
+        topic_count = Topic.query.filter(Topic.forum_id == self.id, Topic.hidden != True).count()
         post_count = Post.query.filter(
             Post.topic_id == Topic.id,
             Topic.forum_id == self.id,