1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

compare strings using "==" not "is", fixes #1980

This commit is contained in:
luto
2018-03-21 14:28:59 +01:00
committed by GitHub
parent 38a208242b
commit 0b825ac3d0

View File

@@ -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)