This commit is contained in:
parent
4b4234314d
commit
044d28cfe9
|
@ -164,7 +164,16 @@ def query_with_stat(info):
|
||||||
|
|
||||||
# Фильтр опубликованных
|
# Фильтр опубликованных
|
||||||
q = q.where(and_(Shout.published_at.is_not(None), Shout.deleted_at.is_(None)))
|
q = q.where(and_(Shout.published_at.is_not(None), Shout.deleted_at.is_(None)))
|
||||||
q = q.group_by(Shout.id, main_author, stats_subquery)
|
q = q.group_by(
|
||||||
|
Shout.id,
|
||||||
|
main_author.id,
|
||||||
|
main_author.name,
|
||||||
|
main_author.slug,
|
||||||
|
main_author.pic,
|
||||||
|
stats_subquery.c.comments_count,
|
||||||
|
stats_subquery.c.rating,
|
||||||
|
stats_subquery.c.last_reacted_at
|
||||||
|
)
|
||||||
return q
|
return q
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user