Fixes #1695: Cannot set custom field selection field back to null value

This commit is contained in:
johnhu 2017-11-14 23:10:30 +08:00
parent 9a7dd5ea19
commit 2c93126520

View File

@ -100,7 +100,7 @@ class CustomField(models.Model):
""" """
Convert a string into the object it represents depending on the type of field Convert a string into the object it represents depending on the type of field
""" """
if serialized_value is '': if serialized_value == '':
return None return None
if self.type == CF_TYPE_INTEGER: if self.type == CF_TYPE_INTEGER:
return int(serialized_value) return int(serialized_value)