From dfbfa9335c9c8dda277ee5af3857ed06b5c34f5c Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 29 Feb 2024 15:47:32 +0300 Subject: [PATCH] get-author-slug-fix --- resolvers/author.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index 077c0f64..db031159 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -79,8 +79,9 @@ async def get_author_by_user_id(user_id: str): if isinstance(res, str): author = json.loads(res) author_id = author.get('id') + author_slug = author.get('slug') if author_id: - logger.debug(f'got author @{author.slug} #{author_id} cached today') + logger.debug(f'got author @{author_slug} #{author_id} cached today') return author q = select(Author).filter(Author.user == user_id)