diff --git a/resolvers/author.py b/resolvers/author.py index 4784e3ca..7c601110 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -219,7 +219,7 @@ async def get_author_followers(_, _info, slug: str): try: with local_session() as session: author_alias = aliased(Author) - author_id = session.query(author_alias).filter(author_alias.slug == slug).first() + author_id = session.query(author_alias.id).filter(author_alias.slug == slug).first() cached = await redis.execute('GET', f'id:{author_id}:followers') results = [] if not cached: