From 961d86c8f9fd85897b441b95e6c25cc455f4b54d Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 25 Apr 2024 11:22:18 +0300 Subject: [PATCH] get-topic-fix-2 --- resolvers/stat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/stat.py b/resolvers/stat.py index 1d15ea3e..8c7728c4 100644 --- a/resolvers/stat.py +++ b/resolvers/stat.py @@ -16,7 +16,7 @@ def add_topic_stat_columns(q): func.count(distinct(aliased_shout.shout)).label("shouts_stat") ) # Join the Topic table with the Author table - q = q.join(Author, TopicFollower.author == Author.id) + q = q.join(Author, TopicFollower.follower == Author.id) aliased_follower = aliased(TopicFollower) q = q.outerjoin( aliased_follower, aliased_follower.follower == Author.id