reactions-sort-order-fix
Some checks failed
deploy / deploy (push) Failing after 1m22s

This commit is contained in:
2023-12-10 01:47:22 +03:00
parent de63f313a5
commit 159c151ae7
2 changed files with 29 additions and 9 deletions

View File

@@ -408,7 +408,7 @@ async def load_reactions_by(_, info, by, limit=50, offset=0):
# sort if by stat is present
if by.get("stat"):
reactions = sorted(reactions, key=lambda r: r.stat.get(by["stat"]) or r.created_at)
reactions = sorted(reactions, key=lambda r: r.stat.get(by["stat"]) or r.created_at, reverse=True)
return reactions