followers-cache-fix
All checks were successful
Deploy on push / deploy (push) Successful in 48s

This commit is contained in:
Untone 2024-05-30 20:55:47 +03:00
parent 8dcd985c67
commit 9212fbe6b5

View File

@ -132,6 +132,8 @@ async def get_cached_topic_followers(topic_id: int):
async def get_cached_author_followers(author_id: int): async def get_cached_author_followers(author_id: int):
# follower profile # follower profile
cached_author = await redis.execute("GET", f"author:id:{author_id}") cached_author = await redis.execute("GET", f"author:id:{author_id}")
author = None
if cache_author:
author = json.loads(cache_author) author = json.loads(cache_author)
if not author: if not author:
return [] return []