From d369cfe3331db814e8c7ce371be2864e1693395a Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 7 Aug 2024 12:49:25 +0300 Subject: [PATCH] ident-fix --- resolvers/reader.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resolvers/reader.py b/resolvers/reader.py index 25e39bfa..9396350a 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -483,12 +483,12 @@ async def load_shouts_discussed(_, info, limit=50, offset=0): if not author_id: return [] # Subquery to find shout IDs that the author has commented on - reaction_subquery = ( - select(Reaction.shout) - .distinct() # Ensure distinct shout IDs - .filter(and_(Reaction.created_by == author_id, Reaction.body.is_not(None))) - .correlate(Shout) # Ensure proper correlation with the main query - ) + reaction_subquery = ( + select(Reaction.shout) + .distinct() # Ensure distinct shout IDs + .filter(and_(Reaction.created_by == author_id, Reaction.body.is_not(None))) + .correlate(Shout) # Ensure proper correlation with the main query + ) q, aliased_reaction = query_shouts() q = q.filter(Shout.id.in_(reaction_subquery)) return get_shouts_with_stats(q, limit, offset=offset)