From dd0c5d15fd856aca68566e1cbf7ae2e7c9a2cf3f Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 9 Apr 2024 13:30:48 +0300 Subject: [PATCH] fix2 --- resolvers/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index 0c8cdffe..74143bba 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -55,7 +55,7 @@ async def get_author(_, _info, slug='', author_id=0): try: # lookup for cached author author_query = select(Author).filter(or_(Author.slug == slug, Author.id == author_id)) - found_author = local_session().execute(author_query).first() + [found_author] = local_session().execute(author_query) logger.debug(found_author) if found_author: logger.debug(f'found author id: {found_author.id}')