From 1cc779e17ba324d96b9a49d391599eb7f1336627 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 5 Jun 2024 23:42:25 +0300 Subject: [PATCH] get-author-id-by-user-id-2 --- services/precache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/precache.py b/services/precache.py index 67759097..629a9a6e 100644 --- a/services/precache.py +++ b/services/precache.py @@ -136,7 +136,7 @@ async def precache_data(): authors_by_id[author_id] = profile author_payload = json.dumps(profile, cls=CustomJSONEncoder) await redis.execute("SET", f"author:id:{author_id}", author_payload) - await redis.execute("SET", f"author:user:{user_id.strip()}", author_payload) + await redis.execute("SET", f"author:user:{user_id.strip()}", author_id) else: logger.error(f"caching {author.dict()}") logger.info(f"{len(authors)} authors precached")