This commit is contained in:
2024-04-17 20:30:05 +03:00
parent 372185e336
commit 47bc3adb69
3 changed files with 9 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ async def cache_author(author: dict):
# update stat all field for followers' caches in <authors> list
followers_str = await redis.execute("GET", f'author:{author.get("id")}:followers')
followers = []
if followers_str:
if isinstance(followers_str, str):
followers = json.loads(followers_str)
if isinstance(followers, list):
for follower in followers: