group-by-asked
All checks were successful
Deploy on push / deploy (push) Successful in 1m9s

This commit is contained in:
Untone 2024-07-26 16:42:26 +03:00
parent 4c625db853
commit 16728f1d49

View File

@ -582,7 +582,7 @@ async def load_shout_comments(_, info, shout: int, limit=50, offset=0):
# filter, group, order, limit, offset
q = q.filter(and_(Reaction.deleted_at.is_(None), Reaction.shout == shout, Reaction.body.is_not(None)))
q = q.group_by(Reaction.id, Author.user, Shout.id)
q = q.group_by(Reaction.id, Author.name, Shout.id)
q = q.order_by(desc(Reaction.created_at))
q = q.limit(limit).offset(offset)