stats-follows
All checks were successful
Deploy to core / deploy (push) Successful in 3m20s

This commit is contained in:
2024-02-21 19:48:33 +03:00
parent 1eac614e35
commit 784f790b83
3 changed files with 77 additions and 41 deletions

View File

@@ -264,7 +264,11 @@ async def get_author_follows(
) -> List[Author]:
with local_session() as session:
if not user and (author_id or slug):
user = session.query(Author.user).where(or_(Author.id == author_id, Author.slug == slug)).first()
user = (
session.query(Author.user)
.where(or_(Author.id == author_id, Author.slug == slug))
.first()
)
if user:
follows = await get_follows_by_user_id(user)
return follows