load-random-top-fix

This commit is contained in:
2024-01-23 04:34:48 +03:00
parent e0395b0ab6
commit 43f0c517b3
3 changed files with 58 additions and 27 deletions

View File

@@ -105,8 +105,8 @@ async def get_my_followed(_, info):
communities = []
with local_session() as session:
author = session.query(Author).filter(Author.user == user_id).first()
if author:
author_id = int(author.id)
if isinstance(author, Author):
author_id = author.id
authors_query = (
session.query(Author)