fixes issue with with last commit if current value is None

refs: #58
refs: #59
This commit is contained in:
Ricardo Bartels
2021-04-26 09:44:21 +02:00
parent 380e78a9ff
commit d6bd331e2a

View File

@@ -371,7 +371,9 @@ class NetBoxObject:
new_value_str = str(new_value).replace("\r", "")
# support NetBox 2.11+ vcpus float value
if self.data_model.get(key) in [int, float] and isinstance(new_value, (int, float)) and \
if current_value is not None and \
self.data_model.get(key) in [int, float] and \
isinstance(new_value, (int, float)) and \
float(current_value) == float(new_value):
continue