mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Tweak comment.
This commit is contained in:
parent
6da21fa796
commit
7ed81c3c66
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue
Block a user