aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2013-01-03 22:06:55 +0000
committerTom Christie2013-01-03 22:06:55 +0000
commit7ed81c3c66cf57c7ea0f4844c6f8206fcc171a2e (patch)
treeac3276c3738975f1a7d13d643e7e38a4f21cd279
parent6da21fa79604ffa7dc57267effa3afb59c63e62b (diff)
downloaddjango-rest-framework-7ed81c3c66cf57c7ea0f4844c6f8206fcc171a2e.tar.bz2
Tweak comment.
-rw-r--r--rest_framework/fields.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index c406a2f3..998911e1 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -187,9 +187,8 @@ class WritableField(Field):
native = data[field_name]
except KeyError:
if self.default is not None and not self.root.partial:
+ # Note: partial updates shouldn't set defaults
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'])