mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04:16 +03:00
Respect false value defaults on WritableField. Fixes #377.
This commit is contained in:
parent
470878a591
commit
0d2377c148
|
@ -135,7 +135,7 @@ class WritableField(Field):
|
||||||
self.error_messages = messages
|
self.error_messages = messages
|
||||||
|
|
||||||
self.validators = self.default_validators + validators
|
self.validators = self.default_validators + validators
|
||||||
self.default = default or self.default
|
self.default = default if default is not None else self.default
|
||||||
self.blank = blank
|
self.blank = blank
|
||||||
|
|
||||||
# Widgets are ony used for HTML forms.
|
# Widgets are ony used for HTML forms.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user