aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Prezument2013-01-02 15:55:35 +0200
committerYuri Prezument2013-01-02 15:57:00 +0200
commit3873bc8a857829a12b2bb6a34610ab5295887660 (patch)
tree3a14d56b1f6dc967cebdfa4be3cb772e07124792
parent6b962cfcf78b24a57cea43f1592df1dcf2646c12 (diff)
downloaddjango-rest-framework-3873bc8a857829a12b2bb6a34610ab5295887660.tar.bz2
Add explaining comment
-rw-r--r--rest_framework/fields.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 47bdc26a..5ae8ff48 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -191,6 +191,8 @@ class WritableField(Field):
except KeyError:
if self.default is not None and not self.root.partial:
native = self.default
+ # partial serializers shouldn't set the default field to avoid
+ # overriding the previously set value
else:
if self.required:
raise ValidationError(self.error_messages['required'])