refactored-get-author-4
All checks were successful
Deploy on push / deploy (push) Successful in 23s

This commit is contained in:
Untone 2024-03-28 19:11:26 +03:00
parent 9d8831d7ed
commit 2d538a292a

View File

@ -71,8 +71,8 @@ async def get_author(_, _info, slug='', author_id=None):
q = select(Author).where(Author.id == author_id) q = select(Author).where(Author.id == author_id)
[author] = await get_authors_with_stat_cached(q) [author] = await get_authors_with_stat_cached(q)
if author: if author:
logger.debug(f'queried author from db {cache_key} -> {cache}')
author_dict = author.dict() author_dict = author.dict()
logger.debug(f'queried author from db {author_dict}')
else: else:
logger.warn('author was not cached!') logger.warn('author was not cached!')
author_query = select(Author).filter(Author.id == author_id) author_query = select(Author).filter(Author.id == author_id)