From 36ab83d02fc5eb946ac74782dee5152d440e1122 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 29 Nov 2023 09:32:24 +0300 Subject: [PATCH] shoutauthor-fix --- resolvers/topic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/topic.py b/resolvers/topic.py index 3633ebc1..74989b96 100644 --- a/resolvers/topic.py +++ b/resolvers/topic.py @@ -25,7 +25,7 @@ def add_topic_stat_columns(q): q.outerjoin(ShoutTopic, Topic.id == ShoutTopic.topic) .add_columns(func.count(distinct(ShoutTopic.shout)).label("shouts_stat")) .outerjoin(aliased_shout_author, ShoutTopic.shout == aliased_shout_author.shout) - .add_columns(func.count(distinct(aliased_shout_author.user)).label("authors_stat")) + .add_columns(func.count(distinct(aliased_shout_author.author)).label("authors_stat")) .outerjoin(aliased_topic_follower) .add_columns(func.count(distinct(aliased_topic_follower.follower)).label("followers_stat")) )