From df934a8fd278321de0d2d90f0be29f4ea389dea8 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 21 May 2024 04:22:36 +0300 Subject: [PATCH] result-fix --- resolvers/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index 6a9ded14..ce907fc6 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -253,7 +253,7 @@ def create_author(user_id: str, slug: str, name: str = ""): @query.field("get_author_followers") async def get_author_followers(_, _info, slug: str): logger.debug(f"getting followers for @{slug}") - author_query = select(Author.id).filter(Author.slug == slug).first() + author_query = select(Author.id).filter(Author.slug == slug) author_id_result = local_session().execute(author_query) author_id = author_id_result[0] if author_id_result else None followers = await get_cached_author_followers(author_id)