From c5f2b2e8bd6cf69cea9e2aee8641ec8089786274 Mon Sep 17 00:00:00 2001 From: bniwredyc Date: Tue, 20 Dec 2022 14:34:08 +0100 Subject: [PATCH] heavy query disabled --- resolvers/zine/profile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resolvers/zine/profile.py b/resolvers/zine/profile.py index 609ccccd..580e5b9e 100644 --- a/resolvers/zine/profile.py +++ b/resolvers/zine/profile.py @@ -41,10 +41,10 @@ def add_author_stat_columns(q): # func.sum(user_rating_aliased.value).label('rating_stat') # ) - # q = q.add_columns(literal(0).label('commented_stat')) - q = q.outerjoin(Reaction, and_(Reaction.createdBy == User.id, Reaction.body.is_not(None))).add_columns( - func.count(distinct(Reaction.id)).label('commented_stat') - ) + q = q.add_columns(literal(0).label('commented_stat')) + # q = q.outerjoin(Reaction, and_(Reaction.createdBy == User.id, Reaction.body.is_not(None))).add_columns( + # func.count(distinct(Reaction.id)).label('commented_stat') + # ) q = q.group_by(User.id)