Server: Add length condition for viewing check errors

This commit is contained in:
Arthur Golubtsov
2019-12-30 01:39:22 +03:00
parent dfbf466706
commit 4573e8ebc9

View File

@@ -254,7 +254,8 @@ def view_battery(value):
def view_selfcheck(value):
if isinstance(value, list):
if len(value)==1:
return value[0]
if len(value[0]) <= 8:
return value[0]
return "ERROR"
return value