fix-authors-sort

This commit is contained in:
tonyrewin 2022-11-17 11:11:30 +03:00
parent ae1857cc93
commit 7dae3e60bf

View File

@ -211,5 +211,6 @@ async def load_authors_by(_, info, by, limit, offset):
if by.get("stat"):
for a in authors:
a.stat = await get_author_stat(a.slug)
authors = list(set(authors)).sort(authors, key=lambda a: a["stat"].get(by.get("stat")))
authors = list(set(authors))
authors = sorted(authors, key=lambda a: a["stat"].get(by.get("stat")))
return authors