From bffa4aa1efcb9855a693b82fed47b67169d17d5d Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 14 Nov 2024 01:36:15 +0300 Subject: [PATCH] unrated-fix5 --- resolvers/reader.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resolvers/reader.py b/resolvers/reader.py index dcaabc7a..d4fc5a2f 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -240,7 +240,7 @@ def get_shouts_with_links(info, q, limit=20, offset=0): a = session.query(Author).filter(Author.id == main_author_id).first() shout_dict["created_by"] = { "id": main_author_id, - "name": a.id, + "name": a.name, "slug": a.slug, "pic": a.pic, } @@ -446,7 +446,10 @@ async def load_shouts_unrated(_, info, options): q = q.join(Author, Author.id == Shout.created_by) q = q.add_columns( json_builder( - "id", Author.id, "name", Author.name, "slug", Author.slug, "pic", Author.pic + "id", Author.id, + "name", Author.name, + "slug", Author.slug, + "pic", Author.pic ).label("main_author") ) q = q.join(ShoutTopic, and_(ShoutTopic.shout == Shout.id, ShoutTopic.main.is_(True)))