mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +03:00
Fix "default" and partial serializers, fixes #532
This commit is contained in:
parent
36e1987f59
commit
6b962cfcf7
|
@ -189,7 +189,7 @@ class WritableField(Field):
|
|||
else:
|
||||
native = data[field_name]
|
||||
except KeyError:
|
||||
if self.default is not None:
|
||||
if self.default is not None and not self.root.partial:
|
||||
native = self.default
|
||||
else:
|
||||
if self.required:
|
||||
|
|
Loading…
Reference in New Issue
Block a user