toler-no-author
All checks were successful
Deploy on push / deploy (push) Successful in 1m9s

This commit is contained in:
Untone 2024-06-05 16:23:53 +03:00
parent 1042eb6e58
commit 67c299939c

View File

@ -66,7 +66,9 @@ async def get_cached_author(author_id: int, get_with_stat):
elif get_with_stat: elif get_with_stat:
with local_session() as session: with local_session() as session:
author_query = select(Author).filter(Author.id == author_id) author_query = select(Author).filter(Author.id == author_id)
[author] = get_with_stat(session.execute(author_query)) result = get_with_stat(session.execute(author_query))
if result:
[author] = result
if author: if author:
await cache_author(author) await cache_author(author)
return author return author