profile fix

This commit is contained in:
Igor Lobanov 2022-11-25 12:52:14 +01:00
parent 385785f55e
commit 399ef2a13e

View File

@ -184,7 +184,7 @@ async def get_authors_all(_, _info):
@query.field("getAuthor") @query.field("getAuthor")
async def get_author(_, _info, slug): async def get_author(_, _info, slug):
with local_session() as session: with local_session() as session:
author = session.query(User).join(ShoutAuthor).where(User.slug == slug).first() author = session.query(User).where(User.slug == slug).first()
author.stat = await get_author_stat(author.slug) author.stat = await get_author_stat(author.slug)
return author return author