Correct NoneType in update_view method

This commit is contained in:
nicolargo 2025-04-12 16:40:26 +02:00
parent 16dee18c52
commit bdef92da4f
1 changed files with 5 additions and 1 deletions

View File

@ -473,7 +473,11 @@ class GlancesPluginModel:
value['hidden'] = False
elif key in self.views and field in self.views[key] and 'hidden' in self.views[key][field]:
value['hidden'] = self.views[key][field]['hidden']
if field in self.hide_zero_fields and i[field] > self.hide_threshold_bytes:
if (
field in self.hide_zero_fields
and i[field] is not None
and i[field] > self.hide_threshold_bytes
):
value['hidden'] = False
else:
value['hidden'] = field in self.hide_zero_fields