diff --git a/resolvers/author.py b/resolvers/author.py index e38fd315..f3e52f15 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -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) diff --git a/services/auth.py b/services/auth.py index 2f4047d9..3ad7114b 100644 --- a/services/auth.py +++ b/services/auth.py @@ -16,6 +16,7 @@ async def check_auth(req): async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=30.0)) as session: async with session.post(AUTH_URL, json=gql) as response: + print(response) if response.status != 200: return False, None r = await response.json()