From 0d2377c1480f3270a538de166be950ab4a0b09c8 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 6 Nov 2012 10:55:58 +0000 Subject: [PATCH] Respect false value defaults on WritableField. Fixes #377. --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d834d9c5b..65d7def5a 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -135,7 +135,7 @@ class WritableField(Field): self.error_messages = messages 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 # Widgets are ony used for HTML forms.