fix getSession, fix getAuthor

This commit is contained in:
2022-11-24 18:19:58 +03:00
parent 0ad10cffec
commit b2b8cf747f
4 changed files with 12 additions and 22 deletions

View File

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