From 809b9801456586c79a0c3d2a25fac52e0c8aa84e Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 6 May 2024 20:04:50 +0300 Subject: [PATCH] load-authors-fix-2 --- resolvers/author.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resolvers/author.py b/resolvers/author.py index b68faa0d..da131bc3 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -163,9 +163,8 @@ async def load_authors_by(_, _info, by, limit, offset): if order in ["shouts", "followers"]: authors_query = authors_query.order_by(desc(text(f"{order}_stat"))) # group by - [authors] = get_with_stat(authors_query) - if authors: - return authors + authors = get_with_stat(authors_query) + return authors or [] @query.field("get_author_follows")