debug-response
All checks were successful
deploy / deploy (push) Successful in 1m36s

This commit is contained in:
2023-12-13 20:13:57 +03:00
parent 29c02158b7
commit a86739ed1b
2 changed files with 3 additions and 1 deletions

View File

@@ -165,10 +165,11 @@ async def load_authors_all(_, _info, limit: int = 50, offset: int = 0):
async def get_author(_, _info, slug="", user=None, author_id=None):
q = None
if slug or user or author_id:
if slug:
if slug != "":
q = select(Author).where(Author.slug == slug)
elif user:
q = select(Author).where(Author.user == user)
print(f"[resolvers.author] SQL: {q}")
elif author_id:
q = select(Author).where(Author.id == author_id)
q = add_author_stat_columns(q)