select-from
All checks were successful
Deploy to core / deploy (push) Successful in 1m19s

This commit is contained in:
Untone 2024-02-22 23:53:28 +03:00
parent d69f29bda3
commit 54f7dd9c1f

View File

@ -98,12 +98,14 @@ def query_follows(user_id: str):
authors_query = (
session.query(aliased_author, AuthorFollower)
.select_from(aliased_author) # явное указание FROM-запроса
.join(AuthorFollower, AuthorFollower.follower == author_id)
.filter(AuthorFollower.author == aliased_author.id)
)
topics_query = (
session.query(Topic, TopicFollower)
.select_from(Topic) # явное указание FROM-запроса
.join(TopicFollower, TopicFollower.follower == author_id)
.filter(TopicFollower.topic == Topic.id)
)