diff --git a/app/models/forum.py b/app/models/forum.py index c459375..71d2381 100644 --- a/app/models/forum.py +++ b/app/models/forum.py @@ -37,4 +37,4 @@ class Forum(db.Model): def post_count(self): """Number of posts in every topic of the forum, without subforums.""" - return sum(len(thread.comments) for thread in self.topics) + return sum(len(t.thread.comments) for t in self.topics)