From 2c9312652058673184061a35febaf6342171556d Mon Sep 17 00:00:00 2001 From: johnhu Date: Tue, 14 Nov 2017 23:10:30 +0800 Subject: [PATCH] Fixes #1695: Cannot set custom field selection field back to null value --- netbox/extras/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/models.py b/netbox/extras/models.py index 9e6624fc4..da96d000e 100644 --- a/netbox/extras/models.py +++ b/netbox/extras/models.py @@ -100,7 +100,7 @@ class CustomField(models.Model): """ Convert a string into the object it represents depending on the type of field """ - if serialized_value is '': + if serialized_value == '': return None if self.type == CF_TYPE_INTEGER: return int(serialized_value)