mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +03:00
In case of None value returns empty string instead of NoneType.
This commit is contained in:
parent
1ce1f387b0
commit
27be31bd8a
|
@ -473,10 +473,7 @@ class CharField(WritableField):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
if value is None:
|
if value is None:
|
||||||
if self.default:
|
return ''
|
||||||
return self.default
|
|
||||||
else:
|
|
||||||
value
|
|
||||||
|
|
||||||
return smart_text(value)
|
return smart_text(value)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user