summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hyperkitty/static/hyperkitty/js/hyperkitty-common.js2
-rw-r--r--hyperkitty/templates/index.html4
2 files changed, 4 insertions, 2 deletions
diff --git a/hyperkitty/static/hyperkitty/js/hyperkitty-common.js b/hyperkitty/static/hyperkitty/js/hyperkitty-common.js
index ac164ea..464cff5 100644
--- a/hyperkitty/static/hyperkitty/js/hyperkitty-common.js
+++ b/hyperkitty/static/hyperkitty/js/hyperkitty-common.js
@@ -130,6 +130,8 @@ function chart(elem_id, data, default_props) {
default_props = {};
}
+ if (!data) { return; }
+
var props = {width: 250, height: 50};
$.extend(props, default_props);
var margin = {top: 0, right: 0, bottom: 0, left: 0},
diff --git a/hyperkitty/templates/index.html b/hyperkitty/templates/index.html
index 7e39a58..475d8be 100644
--- a/hyperkitty/templates/index.html
+++ b/hyperkitty/templates/index.html
@@ -107,14 +107,14 @@
<ul class="list-stats">
<li><span class="participant">
{% if mlist.can_view %}
- {{ mlist.recent_participants_count }}
+ {{ mlist.recent_participants_count|default_if_none:"..." }}
{% else %}
...
{% endif %}
participants</span></li>
<li><span class="discussion">
{% if mlist.can_view %}
- {{ mlist.recent_threads_count }}
+ {{ mlist.recent_threads_count|default_if_none:"..." }}
{% else %}
...
{% endif %}