From a9dd593ac89a112565134f08ba5b3cc389af8162 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 12 Feb 2025 00:47:39 +0300 Subject: [PATCH] main_topic-fix3 --- resolvers/editor.py | 6 +----- resolvers/reader.py | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/resolvers/editor.py b/resolvers/editor.py index b3870ab3..1b81847c 100644 --- a/resolvers/editor.py +++ b/resolvers/editor.py @@ -662,11 +662,7 @@ def get_main_topic_slug(topics): main_topic = next((t for t in topics_list if t.main), None) if main_topic: - return { - "slug": main_topic.topic.slug, - "title": main_topic.topic.title, - "id": main_topic.topic.id - } + return main_topic.topic.dict() # If no main topic found, return default return {"slug": "notopic", "title": "no topic", "id": 0} diff --git a/resolvers/reader.py b/resolvers/reader.py index f1ffd42d..6cd9fc65 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -293,7 +293,6 @@ def apply_filters(q, filters): @query.field("get_shout") -@login_accepted async def get_shout(_, info: GraphQLResolveInfo, slug="", shout_id=0): """ Получение публикации по slug или id.