ensure smart_text will be called

This commit is contained in:
Anton Martyniuk 2014-06-28 23:11:19 +02:00
parent 8eadac39ad
commit 5e0b96b035

View File

@ -474,10 +474,7 @@ class CharField(WritableField):
self.validators.append(validators.MaxLengthValidator(max_length))
def from_native(self, value):
if isinstance(value, six.string_types):
return value
if value is None:
if value in validators.EMPTY_VALUES:
return ''
return smart_text(value)