From 52d8047546023b08cf4dc312d87e9ad844e30c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Mon, 10 Jan 2022 16:56:31 +0100 Subject: [PATCH] Correctly detect presence of storage metric If there have been no uploads yet, the metric will be zero, so the if condition would fail the test, so it would render as "unknown". --- snikket_web/templates/admin_system.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snikket_web/templates/admin_system.html b/snikket_web/templates/admin_system.html index 00bcd35..fe547de 100644 --- a/snikket_web/templates/admin_system.html +++ b/snikket_web/templates/admin_system.html @@ -70,7 +70,7 @@
{% trans %}Storage used by shared files{% endtrans %}
- {%- if metrics.prosody_uploads -%} + {%- if metrics.prosody_uploads | default(None) is not none -%} {{ metrics.prosody_uploads | format_bytes }} {%- else -%} {% trans %}unknown{% endtrans %}