Bug fix - GUI would raise errors if a field was None at some point
@@ -70,7 +70,9 @@ class DashApp:
def get_field(self, name):
data = self.app.get_field(name)
+ if data is not None:
tensors = struct.flatten(data)
+ if tensors:
minimum = min([numpy.min(tensor) for tensor in tensors])
maximum = max([numpy.max(tensor) for tensor in tensors])
if name in self.field_minmax:
@@ -84,4 +86,7 @@ class DashApp:
self.field_minmax = {}
def get_minmax(self, field):
+ if field in self.field_minmax:
return self.field_minmax[field]
+ else:
+ return 0, 0
