diff --git a/resolvers/follower.py b/resolvers/follower.py index 0ccee9b7..eb8b70d8 100644 --- a/resolvers/follower.py +++ b/resolvers/follower.py @@ -98,19 +98,17 @@ def query_follows(user_id: str): authors_query = ( session.query(aliased_author, AuthorFollower) - .select_from(aliased_author) # явное указание FROM-запроса .join(AuthorFollower, AuthorFollower.follower == author_id) .filter(AuthorFollower.author == aliased_author.id) ) topics_query = ( session.query(Topic, TopicFollower) - .select_from(Topic) # явное указание FROM-запроса .join(TopicFollower, TopicFollower.follower == author_id) .filter(TopicFollower.topic == Topic.id) ) - authors_query = add_author_stat_columns(authors_query) + authors_query = add_author_stat_columns(authors_query, author_model=aliased_author) topics_query = add_topic_stat_columns(topics_query) authors = [ {