row-adapt
All checks were successful
Deploy to core / deploy (push) Successful in 2m39s

This commit is contained in:
Untone 2024-02-21 22:29:27 +03:00
parent 1796d0c82d
commit aed1885278

View File

@ -229,11 +229,12 @@ async def get_author_follows(
) -> List[Author]:
with local_session() as session:
if not user and (author_id or slug):
user = (
user_query_result = (
session.query(Author.user)
.where(or_(Author.id == author_id, Author.slug == slug))
.first()
)
user = user_query_result[0] if user_query_result else None
if user:
follows = query_follows(user)
return follows