From 67636e6d174392d801243d0ace80fd70ef0f3da6 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 5 Jun 2024 18:18:03 +0300 Subject: [PATCH] author-id-fix --- services/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/cache.py b/services/cache.py index 8b0ac7dd..44bc1ff9 100644 --- a/services/cache.py +++ b/services/cache.py @@ -76,7 +76,8 @@ async def get_cached_author(author_id: int, get_with_stat): async def get_cached_author_by_user_id(user_id: str, get_with_stat): - author_id = await redis.execute("GET", f"author:user:{user_id}") + author_dict = await redis.execute("GET", f"author:user:{user_id}") + author_id = author_dict.get("id") if author_id: return await get_cached_author(int(author_id), get_with_stat)