You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/06/04 14:35:14 UTC

[incubator-ponymail-foal] branch master updated: make even easier to read

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new eb4314c  make even easier to read
eb4314c is described below

commit eb4314c95a8cc8722376aa10a999dd9186b26785
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Jun 4 16:35:08 2021 +0200

    make even easier to read
---
 server/endpoints/stats.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/endpoints/stats.py b/server/endpoints/stats.py
index c73b30c..ef3b498 100644
--- a/server/endpoints/stats.py
+++ b/server/endpoints/stats.py
@@ -49,7 +49,7 @@ async def process(server: plugins.server.BaseServer, session: plugins.session.Se
     xlist = indata.get("list", "*")
     xdomain = indata.get("domain", "*")
 
-    all_authors = sorted(authors.items(), key=lambda x: -x[1]) # negative prefix for reverse sort
+    all_authors = sorted(authors.items(), key=lambda x: x[1], reverse=True) # sort in reverse by author count
     top10_authors = []
     for author, count in all_authors[:10]:
         name, address = email.utils.parseaddr(author)