This commit is contained in:
parent
0f038ac6d7
commit
d9abea9840
|
@ -86,11 +86,12 @@ async def unfollow(_, info, what, slug):
|
||||||
def query_follows(user_id: str):
|
def query_follows(user_id: str):
|
||||||
topics = []
|
topics = []
|
||||||
authors = []
|
authors = []
|
||||||
|
author_id = None
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
author_id = (
|
author = (
|
||||||
session.query(Author.id).filter(Author.user == user_id).first()
|
session.query(Author).filter(Author.user == user_id).first()
|
||||||
)
|
)
|
||||||
session.commit()
|
author_id = author.id
|
||||||
if isinstance(author_id, int):
|
if isinstance(author_id, int):
|
||||||
authors_query = (
|
authors_query = (
|
||||||
select(Author)
|
select(Author)
|
||||||
|
@ -99,7 +100,7 @@ def query_follows(user_id: str):
|
||||||
)
|
)
|
||||||
authors = [
|
authors = [
|
||||||
{
|
{
|
||||||
'id': author.id,
|
'id': author_id,
|
||||||
'name': author.name,
|
'name': author.name,
|
||||||
'slug': author.slug,
|
'slug': author.slug,
|
||||||
'pic': author.pic,
|
'pic': author.pic,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user