get_author-follows-fixed

This commit is contained in:
Untone 2024-03-28 14:58:47 +03:00
parent cf6230e8d6
commit 2ee87c975a

View File

@ -173,10 +173,10 @@ async def get_author_follows(_, _info, slug='', user=None, author_id=0):
author_query = author_query.filter(Author.id == author_id) author_query = author_query.filter(Author.id == author_id)
else: else:
raise ValueError('One of slug, user, or author_id must be provided') raise ValueError('One of slug, user, or author_id must be provided')
logger.debug(author_query) # logger.debug(author_query)
[author] = local_session().execute(author_query) [author] = local_session().execute(author_query)
if isinstance(author, Author): if isinstance(author, Author):
# logger.debug(author.dict()) logger.debug(author.dict())
author_id = author.id.scalar() author_id = author.id.scalar()
rkey = f'author:{author_id}:follows-authors' rkey = f'author:{author_id}:follows-authors'
logger.debug(f'getting {author_id} follows authors') logger.debug(f'getting {author_id} follows authors')