From 14dc1c761a7eefe8da57f34629c8c2fa4edf1d8a Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 29 Dec 2023 02:31:44 +0300 Subject: [PATCH] fix-get-author-i --- resolvers/author.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resolvers/author.py b/resolvers/author.py index 9c453b4a..9d7d83f2 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -153,9 +153,10 @@ def count_author_shouts_rating(session, author_id) -> int: def load_author_with_stats(q): q = add_author_stat_columns(q) - [author] = get_authors_from_query(q) + result = get_authors_from_query(q) - if author: + if result: + [author] = result with local_session() as session: comments_count = ( session.query(Reaction)