reaction-model-fix
All checks were successful
deploy / deploy (push) Successful in 2m19s

This commit is contained in:
2023-11-27 19:03:47 +03:00
parent 909ddbd79d
commit caa2dbfdf3
6 changed files with 83 additions and 77 deletions

View File

@@ -138,14 +138,14 @@ async def get_authors_all(_, _info):
@query.field("getAuthor")
async def get_author(_, _info, slug="", user=None, author=None):
if slug or user or author:
async def get_author(_, _info, slug="", user=None, author_id=None):
if slug or user or author_id:
if slug:
q = select(Author).where(Author.slug == slug)
elif user:
q = select(Author).where(Author.user == user)
elif author:
q = select(Author).where(Author.id == author)
elif author_id:
q = select(Author).where(Author.id == author_id)
q = add_author_stat_columns(q)
authors = get_authors_from_query(q)