This commit is contained in:
@@ -662,11 +662,7 @@ def get_main_topic_slug(topics):
|
|||||||
|
|
||||||
main_topic = next((t for t in topics_list if t.main), None)
|
main_topic = next((t for t in topics_list if t.main), None)
|
||||||
if main_topic:
|
if main_topic:
|
||||||
return {
|
return main_topic.topic.dict()
|
||||||
"slug": main_topic.topic.slug,
|
|
||||||
"title": main_topic.topic.title,
|
|
||||||
"id": main_topic.topic.id
|
|
||||||
}
|
|
||||||
|
|
||||||
# If no main topic found, return default
|
# If no main topic found, return default
|
||||||
return {"slug": "notopic", "title": "no topic", "id": 0}
|
return {"slug": "notopic", "title": "no topic", "id": 0}
|
||||||
|
|||||||
@@ -293,7 +293,6 @@ def apply_filters(q, filters):
|
|||||||
|
|
||||||
|
|
||||||
@query.field("get_shout")
|
@query.field("get_shout")
|
||||||
@login_accepted
|
|
||||||
async def get_shout(_, info: GraphQLResolveInfo, slug="", shout_id=0):
|
async def get_shout(_, info: GraphQLResolveInfo, slug="", shout_id=0):
|
||||||
"""
|
"""
|
||||||
Получение публикации по slug или id.
|
Получение публикации по slug или id.
|
||||||
|
|||||||
Reference in New Issue
Block a user