author subscriptions fix
This commit is contained in:
parent
feab95872d
commit
0a0c94f495
|
@ -120,11 +120,8 @@ async def get_followed_authors(_, _info, user_id: int) -> List[User]:
|
||||||
async def followed_authors(user_id):
|
async def followed_authors(user_id):
|
||||||
q = select(User)
|
q = select(User)
|
||||||
q = add_author_stat_columns(q)
|
q = add_author_stat_columns(q)
|
||||||
aliased_user = aliased(User)
|
q = q.join(AuthorFollower, AuthorFollower.author == User.id).where(
|
||||||
q = q.join(AuthorFollower, AuthorFollower.author == user_id).join(
|
AuthorFollower.follower == user_id
|
||||||
aliased_user, aliased_user.id == AuthorFollower.follower
|
|
||||||
).where(
|
|
||||||
aliased_user.id == user_id
|
|
||||||
)
|
)
|
||||||
return get_authors_from_query(q)
|
return get_authors_from_query(q)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user