From 142a5f09af17f13f3912f1b727fc1d0081a649c0 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 9 Apr 2024 19:40:44 +0300 Subject: [PATCH] .. --- resolvers/stat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resolvers/stat.py b/resolvers/stat.py index c3a8472b..a49334e3 100644 --- a/resolvers/stat.py +++ b/resolvers/stat.py @@ -38,7 +38,8 @@ def add_topic_stat_columns(q): # Create a subquery for comments count sub_comments = ( select( - Shout.id.label('shout_id'), func.coalesce(func.count(Reaction.id)).label('comments_count') + Shout.id.label('shout_id'), + func.coalesce(func.count(Reaction.id)).label('comments_count') ) .join(ShoutTopic, Topic.id == ShoutTopic.topic) .join(Shout, ShoutTopic.shout == Shout.id)