From 9647ec9708e5eaf9864406b529b237bfa1f50161 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 28 Mar 2024 19:16:47 +0300 Subject: [PATCH] scalar --- resolvers/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index a65c450b..f094147e 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -58,7 +58,7 @@ async def get_author(_, _info, slug='', author_id=None): author_dict = None try: if slug: - author_id = local_session().query(Author.id).filter(Author.slug == slug) + author_id = local_session().query(Author.id).filter(Author.slug == slug).scalar() logger.debug(f'found @{slug} with id {author_id}') if author_id: cache_key = f'author:{author_id}'