From 01d2d90df19b39daeb6cec37afb552b10c5befc8 Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 27 May 2024 19:55:56 +0300 Subject: [PATCH] cached-empty-fix --- resolvers/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index b4a78264..76747196 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -330,7 +330,7 @@ async def get_author_followers(_, _info, slug: str): cached = await redis.execute("GET", f"author:{author_id}:followers") if cached: followers_cached = json.loads(cached) - if isinstance(followers_cached, list): + if isinstance(followers_cached, list) and len(followers_cached) > 0: logger.debug( f"@{slug} got {len(followers_cached)} followers cached" )