From b0637da11d41d56bb2a61613e9305a00ede0fe8d Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 30 May 2024 20:14:26 +0300 Subject: [PATCH] cache-fix-4 --- services/cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/cache.py b/services/cache.py index 6408e615..0fe53caa 100644 --- a/services/cache.py +++ b/services/cache.py @@ -170,8 +170,8 @@ async def get_cached_follower_authors(author_id: int): .where(AuthorFollower.follower == author_id) ) with local_session() as session: - authors_ids = session.execute(authors_query) - await redis.execute("SET", rkey, json.dumps([int(f"{aid}") for aid in authors_ids])) + [authors_ids] = session.execute(authors_query) + await redis.execute("SET", rkey, json.dumps([int(aid) for aid in authors_ids])) elif isinstance(cached, str): authors_ids = json.loads(cached) return await get_cached_authors_by_ids(authors_ids)