From d6bd331e2a1fa939644f3f877bbdff4bd05ada96 Mon Sep 17 00:00:00 2001 From: Ricardo Bartels Date: Mon, 26 Apr 2021 09:44:21 +0200 Subject: [PATCH] fixes issue with with last commit if current value is None refs: #58 refs: #59 --- module/netbox/object_classes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/netbox/object_classes.py b/module/netbox/object_classes.py index 0eda2f6..3320e2f 100644 --- a/module/netbox/object_classes.py +++ b/module/netbox/object_classes.py @@ -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