get-user-followsx
All checks were successful
Deploy to core / deploy (push) Successful in 1m25s

This commit is contained in:
Untone 2024-02-22 13:07:09 +03:00
parent 0f038ac6d7
commit d9abea9840

View File

@ -86,11 +86,12 @@ async def unfollow(_, info, what, slug):
def query_follows(user_id: str):
topics = []
authors = []
author_id = None
with local_session() as session:
author_id = (
session.query(Author.id).filter(Author.user == user_id).first()
author = (
session.query(Author).filter(Author.user == user_id).first()
)
session.commit()
author_id = author.id
if isinstance(author_id, int):
authors_query = (
select(Author)
@ -99,7 +100,7 @@ def query_follows(user_id: str):
)
authors = [
{
'id': author.id,
'id': author_id,
'name': author.name,
'slug': author.slug,
'pic': author.pic,