From 5bdfdad63ea7b49fafde77463cb884cad5c03f4c Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 30 May 2025 08:54:20 +0300 Subject: [PATCH] load_authors_by-fix --- resolvers/author.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resolvers/author.py b/resolvers/author.py index 80177416..d8c50072 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -309,7 +309,7 @@ async def get_authors_all(_, info): # Получаем ID текущего пользователя и флаг админа из контекста viewer_id = info.context.get("author", {}).get("id") is_admin = info.context.get("is_admin", False) - authors = await get_all_authors(viewer_id, is_admin) + authors = await get_all_authors(viewer_id) return authors @@ -384,7 +384,7 @@ async def load_authors_by(_, info, by, limit, offset): is_admin = info.context.get("is_admin", False) # Используем оптимизированную функцию для получения авторов - return await get_authors_with_stats(limit, offset, by, viewer_id, is_admin) + return await get_authors_with_stats(limit, offset, by, viewer_id) except Exception as exc: import traceback