From ce736e2624fb2b86c17dd9d7893a88effc945e88 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 22 Feb 2024 21:10:43 +0300 Subject: [PATCH] session-commit-fix --- resolvers/follower.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resolvers/follower.py b/resolvers/follower.py index 34d6c101..01c9dc6f 100644 --- a/resolvers/follower.py +++ b/resolvers/follower.py @@ -93,8 +93,10 @@ def query_follows(user_id: str): author = ( session.query(Author).filter(Author.user == user_id).first() ) + if isinstance(author, Author): author_id = author.id + session.commit() authors_query = ( select(Author) .join(AuthorFollower, AuthorFollower.follower == author_id)