groupby-fix-2
This commit is contained in:
parent
b13d57ca17
commit
4aa4303a59
|
@ -54,7 +54,7 @@ def add_topic_stat_columns(q):
|
||||||
func.coalesce(func.sum(sub_comments.c.comments_count), 0).label('comments_stat')
|
func.coalesce(func.sum(sub_comments.c.comments_count), 0).label('comments_stat')
|
||||||
)
|
)
|
||||||
|
|
||||||
q = q.group_by(Topic.id, sub_comments.c.comments_stat)
|
q = q.group_by(Topic.id)
|
||||||
|
|
||||||
return q
|
return q
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user