diff --git a/resolvers/stat.py b/resolvers/stat.py index 13190670..f894422f 100644 --- a/resolvers/stat.py +++ b/resolvers/stat.py @@ -25,7 +25,7 @@ def add_topic_stat_columns(q): aliased_authors.author == Author.id, Topic.id.in_(select(ShoutTopic.topic).where(ShoutTopic.shout == aliased_shout.id)) )) - q = q.add_columns(func.count(distinct(aliased_authors.author_id)).label('authors_stat')) + q = q.add_columns(func.count(distinct(aliased_authors.author)).label('authors_stat')) # followers q = q.outerjoin(aliased_followers, aliased_followers.topic == Topic.id)