groupby-fix-2
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user