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 2020/09/08 16:17:38 UTC
[incubator-ponymail-foal] 01/02: Only do word clouds if enabled
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
commit 3fa4d755cb0c962678578855c59d0826399afac2
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Sep 8 18:16:34 2020 +0200
Only do word clouds if enabled
---
server/endpoints/stats.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/server/endpoints/stats.py b/server/endpoints/stats.py
index c9f6568..d142aec 100644
--- a/server/endpoints/stats.py
+++ b/server/endpoints/stats.py
@@ -47,7 +47,9 @@ async def process(
for msg in results:
msg["gravatar"] = plugins.mbox.gravatar(msg)
- wordcloud = await plugins.mbox.wordcloud(session, query_defuzzed)
+ wordcloud = None
+ if server.config.ui.wordcloud:
+ wordcloud = await plugins.mbox.wordcloud(session, query_defuzzed)
first_year, last_year = await plugins.mbox.get_years(session, query_defuzzed_nodate)
tstruct, authors = await server.runners.run(plugins.mbox.construct_threads, results)