Quellcode durchsuchen

[variable] check if value is not none when casting

Maxime Alves LIRMM@home vor 3 Jahren
Ursprung
Commit
30d0b72e7f
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2
    1
      pyheatpump/models/variable.py

+ 2
- 1
pyheatpump/models/variable.py Datei anzeigen

@@ -97,7 +97,8 @@ class Variable(RowClass):
97 97
                 AND var.last_update > :since""",
98 98
             params)
99 99
 
100
-            if 'address' in row.keys() and 'value' in row.keys()
100
+            if 'address' in row.keys() and 'value' in row.keys() and
101
+                row['value'] is not None
101 102
         }
102 103
 
103 104
 

Laden…
Abbrechen
Speichern