diff --git a/resolvers/reader.py b/resolvers/reader.py index 1724e780..d8fb9a81 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -164,7 +164,7 @@ def query_with_stat(info): # Фильтр опубликованных q = q.where(and_(Shout.published_at.is_not(None), Shout.deleted_at.is_(None))) - q = q.group_by(Shout.id, main_author.id) + q = q.group_by(Shout.id, main_author, stats_subquery) return q