linx5o commited on
Commit
9cb729f
1 Parent(s): dfabf3a
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -675,7 +675,7 @@ def get_data_default(time_scale, exp):
675
 
676
  client.unsubscribe(f"pioreactor/{PIOREACTOR}/readings")
677
 
678
- if len(temp_graph) != 0:
679
  for temp in temp_graph:
680
  utc_time = datetime.strptime(temp["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
681
  local_tz = pytz.timezone("America/New_York")
@@ -695,7 +695,7 @@ def get_data_default(time_scale, exp):
695
  else:
696
  plot1 = None
697
 
698
- if len(od_graph) != 0:
699
  for od in od_graph:
700
  utc_time = datetime.strptime(od["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
701
  local_tz = pytz.timezone("America/New_York")
@@ -715,7 +715,7 @@ def get_data_default(time_scale, exp):
715
  else:
716
  plot2 = None
717
 
718
- if len(norm_od_graph) != 0:
719
  for od in norm_od_graph:
720
  utc_time = datetime.strptime(od["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
721
  local_tz = pytz.timezone("America/New_York")
@@ -735,7 +735,7 @@ def get_data_default(time_scale, exp):
735
  else:
736
  plot3 = None
737
 
738
- if len(growth_rate_graph) != 0:
739
  for gr in growth_rate_graph:
740
  utc_time = datetime.strptime(gr["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
741
  local_tz = pytz.timezone("America/New_York")
 
675
 
676
  client.unsubscribe(f"pioreactor/{PIOREACTOR}/readings")
677
 
678
+ if temp_graph is not None:
679
  for temp in temp_graph:
680
  utc_time = datetime.strptime(temp["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
681
  local_tz = pytz.timezone("America/New_York")
 
695
  else:
696
  plot1 = None
697
 
698
+ if od_graph is not None:
699
  for od in od_graph:
700
  utc_time = datetime.strptime(od["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
701
  local_tz = pytz.timezone("America/New_York")
 
715
  else:
716
  plot2 = None
717
 
718
+ if norm_od_graph is not None:
719
  for od in norm_od_graph:
720
  utc_time = datetime.strptime(od["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
721
  local_tz = pytz.timezone("America/New_York")
 
735
  else:
736
  plot3 = None
737
 
738
+ if growth_rate_graph is not None:
739
  for gr in growth_rate_graph:
740
  utc_time = datetime.strptime(gr["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
741
  local_tz = pytz.timezone("America/New_York")