..
Some checks failed
Deploy on push / deploy (push) Failing after 6s

This commit is contained in:
Untone 2024-04-09 19:40:44 +03:00
parent c6a4f04779
commit 142a5f09af

View File

@ -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)