File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ def at(l, id):
14
14
@register .filter
15
15
def to_rgb (tup ):
16
16
if tup is None :
17
- return '80, 80, 80 '
17
+ return '100, 100, 100 '
18
18
return ',' .join ([str (x ) for x in tup ])
Original file line number Diff line number Diff line change @@ -74,7 +74,14 @@ def get_context_data(self, **kwargs):
74
74
room_current_values = {}
75
75
for room in campaign .rooms .all ():
76
76
room_current_values [room .pk ] = room_calculate_current_values (room )
77
-
77
+
78
+ print (room_current_values [room .pk ])
79
+ # for better dispaying set alle values that are None to '- '
80
+ for i in range (0 , len (room_current_values [room .pk ]), 2 ):
81
+ if room_current_values [room .pk ][i ] is None :
82
+ room_current_values [room .pk ][i ] = '- '
83
+ print (room_current_values [room .pk ])
84
+
78
85
context ['room_current_values' ] = room_current_values
79
86
80
87
return context
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ def get_current_mean(dimension):
115
115
current_tvoc = get_current_mean (Dimension .TVOC )
116
116
tvoc_color = Dimension .get_color (Dimension .TVOC , current_tvoc ) if current_tvoc else None
117
117
118
- return (
118
+ return [
119
119
current_temperature ,
120
120
temperature_color ,
121
121
current_pm2_5 ,
@@ -124,4 +124,4 @@ def get_current_mean(dimension):
124
124
co2_color ,
125
125
current_tvoc ,
126
126
tvoc_color
127
- )
127
+ ]
You can’t perform that action at this time.
0 commit comments