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

sebb 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 94747cf  Fix typing issue
94747cf is described below

commit 94747cfc3f45f5521b2de9ed211104dd090c8f18
Author: Sebb <[email protected]>
AuthorDate: Mon Oct 11 00:46:34 2021 +0100

    Fix typing issue
---
 server/endpoints/stats.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/endpoints/stats.py b/server/endpoints/stats.py
index c0d0371..481367e 100644
--- a/server/endpoints/stats.py
+++ b/server/endpoints/stats.py
@@ -65,7 +65,7 @@ async def process(
 
     authors = {}
     tstruct = {}
-    top10_authors = {} # This is the default used in stats.lua
+    top10_authors = None
     if not statsOnly and not emailsOnly:
         threads = plugins.messages.ThreadConstructor(results)
         tstruct, authors = await server.runners.run(threads.construct)
@@ -97,7 +97,7 @@ async def process(
         "numparts": len(authors),
         "no_threads": len(tstruct),
         "emails": list(sorted(results, key=lambda x: x["epoch"])),
-        "participants": top10_authors,
+        "participants": top10_authors or {},
         "searchlist": f"<{xlist}.{xdomain}>",
         "domain": xdomain,
         "name": xlist,

Reply via email to