This commit is contained in:
parent
739b7b40d6
commit
6e17b89f26
|
@ -36,8 +36,8 @@ async def follow(_, info, what, slug):
|
|||
if what == 'AUTHOR':
|
||||
error = author_follow(follower.id, slug)
|
||||
if not error:
|
||||
author_query = select(Author).where(Author.slug == slug)
|
||||
[author] = local_session().execute(author_query)
|
||||
author = local_session().query(Author).where(Author.slug == slug).first()
|
||||
if author:
|
||||
await notify_follower(follower.dict(), author.id, 'follow')
|
||||
|
||||
elif what == 'TOPIC':
|
||||
|
@ -76,8 +76,8 @@ async def unfollow(_, info, what, slug):
|
|||
# NOTE: after triggers should update cached stats
|
||||
if not error:
|
||||
logger.info(f'@{follower.slug} unfollowed @{slug}')
|
||||
author_query = select(Author).where(Author.slug == slug)
|
||||
[author] = local_session().execute(author_query)
|
||||
author = local_session().query(Author).where(Author.slug == slug).first()
|
||||
if author:
|
||||
await notify_follower(follower.dict(), author.id, 'unfollow')
|
||||
|
||||
elif what == 'TOPIC':
|
||||
|
|
Loading…
Reference in New Issue
Block a user