From a6d604f233cab06a4d054e458e93bdda54c69b8f Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 31 Jan 2024 18:18:36 +0300 Subject: [PATCH] following-set-fix --- resolvers/follower.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/resolvers/follower.py b/resolvers/follower.py index b00200b8..7afd5190 100644 --- a/resolvers/follower.py +++ b/resolvers/follower.py @@ -118,12 +118,8 @@ async def get_my_followed(_, info): .filter(TopicFollower.topic == Topic.id) ) - for [author] in session.execute(authors_query).all(): - authors.add(author) - - for [topic] in session.execute(topics_query).all(): - topics.add(topic) - + authors = set(session.execute(authors_query).all()) + topics = set(session.execute(topics_query).all()) communities = session.query(Community).all() return {'topics': list(topics), 'authors': list(authors), 'communities': communities}