From 0b825ac3d0f0ec31b0e7e7fbd9612ae192c07d47 Mon Sep 17 00:00:00 2001 From: luto Date: Wed, 21 Mar 2018 14:28:59 +0100 Subject: [PATCH] compare strings using "==" not "is", fixes #1980 --- 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 341405016..75945adcd 100644 --- a/netbox/extras/models.py +++ b/netbox/extras/models.py @@ -127,7 +127,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)