rating-fix
All checks were successful
Deploy on push / deploy (push) Successful in 23s

This commit is contained in:
2024-03-28 20:45:03 +03:00
parent d6bf3e1602
commit ea16de3f1a
2 changed files with 8 additions and 6 deletions

View File

@@ -64,8 +64,8 @@ async def get_author(_, _info, slug='', author_id=0):
if isinstance(author, Author):
author_id = author.id
logger.debug(f'found @{slug} with id {author_id}')
if not author.stat:
[author] = get_with_stat(author_query)
if not author.stat or not author.stat['rating']:
[author] = get_with_stat(author_query, with_rating=True)
if author:
await set_author_cache(author.dict())
logger.debug('updated author stored in cache')