From 07817c7b11681ee0b31e7eece47448e955a637d6 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Mon, 31 Oct 2022 13:22:49 +0200 Subject: [PATCH] all authors fix --- resolvers/profile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resolvers/profile.py b/resolvers/profile.py index a20243f6..7015bce3 100644 --- a/resolvers/profile.py +++ b/resolvers/profile.py @@ -14,7 +14,7 @@ from .community import followed_communities from .inbox import get_unread_counter from .topics import get_topic_stat from services.auth.users import UserStorage -from services.zine.shoutauthor import ShoutAuthorStorage +from services.zine.shoutscache import ShoutsCache from services.stat.reacted import ReactedStorage @@ -198,7 +198,7 @@ def author_unfollow(user, slug): @query.field("authorsAll") async def get_authors_all(_, _info): authors = await UserStorage.get_all_users() - authorslugs = await ShoutAuthorStorage.get_authors() + authorslugs = await ShoutsCache.by_author.keys() authors = filter(lambda a: a.emailConfirmed and a.slug in authorslugs, authors) for author in authors: author.stat = await get_author_stat(author.slug)