From 64b14982154b2758bc9cb4fe51a2111ba9c3ca82 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 14 Mar 2024 01:35:09 +0300 Subject: [PATCH] authorid-fix --- resolvers/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index c6c5600e..0a2e68f4 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().query(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)