left-join-fix
This commit is contained in:
parent
870d5b62dc
commit
83204d1dff
|
@ -119,6 +119,7 @@ def get_author_comments_stat(author_id: int):
|
|||
select(
|
||||
Author.id, func.coalesce(func.count(Reaction.id)).label("comments_count")
|
||||
)
|
||||
.select_from(Author) # явно указываем левый элемент join'а
|
||||
.outerjoin(
|
||||
Reaction,
|
||||
and_(
|
||||
|
|
Loading…
Reference in New Issue
Block a user