followers-migrated

This commit is contained in:
2022-09-18 17:29:21 +03:00
parent 60c7a1571b
commit 1122fe580b
12 changed files with 144 additions and 76 deletions

View File

@@ -165,7 +165,10 @@ async def rate_user(_, info, slug, value):
# for mutation.field("follow")
def author_follow(user, slug):
AuthorFollower.create(follower=user.slug, author=slug)
with local_session() as session:
af = AuthorFollower.create(follower=user.slug, author=slug)
session.add(af)
session.commit()
# for mutation.field("unfollow")