From 9dab10d04ccc332b42311bd0a121972be04bad44 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 14 Nov 2023 21:51:02 +0300 Subject: [PATCH] format+fix-6 --- services/core.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/core.py b/services/core.py index 18d25a3..12ad62c 100644 --- a/services/core.py +++ b/services/core.py @@ -56,7 +56,8 @@ async def get_my_followings(): r = response.json() data = r.get("data") if data: - authors = data.get(query_name, {}).get("authors", []) - return authors - else: - return [] + d = data.get(query_name) + if d: + authors = d.get("authors", []) + return authors + return []