This commit is contained in:
parent
1042eb6e58
commit
67c299939c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user