From 4dbb6649b44cafa5faa0087afabd48eafd9b44d8 Mon Sep 17 00:00:00 2001 From: wznln <18435084+Xuwznln@users.noreply.github.com> Date: Tue, 29 Apr 2025 22:48:25 +0800 Subject: [PATCH] fix: device.class possible null --- unilabos/app/web/templates/status.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/unilabos/app/web/templates/status.html b/unilabos/app/web/templates/status.html index f4ef011a..e1105b7b 100644 --- a/unilabos/app/web/templates/status.html +++ b/unilabos/app/web/templates/status.html @@ -333,8 +333,13 @@
-
{{ device.class|tojson(indent=4) }}
- + {% if device.class %} +
{{ device.class | tojson(indent=4) }}
+ {% else %} + +
// No data
+ {% endif %} + {% if device.is_online %}
在线
{% endif %} @@ -366,7 +371,12 @@