This commit is contained in:
parent
d69f29bda3
commit
54f7dd9c1f
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user