From 3231e424284742ac02c26b6f0814ec6442730f28 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 13 Mar 2024 15:53:40 +0300 Subject: [PATCH] query-fix --- resolvers/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index 2d147daa..c6c5600e 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -44,7 +44,7 @@ async def get_author(_, _info, slug='', author_id=None): author = None try: if slug: - [author_id] = local_session().execute(Author.id).filter(Author.slug == slug).scalar() + [author_id] = local_session().query(Author.id).filter(Author.slug == slug).scalar() if author_id: cache_key = f'author:{author_id}' cache = await redis.execute('GET', cache_key)