From aed1885278b90e5744d35bf24736e8f9933ac0c0 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 21 Feb 2024 22:29:27 +0300 Subject: [PATCH] row-adapt --- resolvers/author.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index 9f061b62..5270bb64 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -229,11 +229,12 @@ async def get_author_follows( ) -> List[Author]: with local_session() as session: if not user and (author_id or slug): - user = ( + user_query_result = ( session.query(Author.user) .where(or_(Author.id == author_id, Author.slug == slug)) .first() ) + user = user_query_result[0] if user_query_result else None if user: follows = query_follows(user) return follows