mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +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:
|
else:
|
||||||
native = data[field_name]
|
native = data[field_name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
if self.default is not None:
|
if self.default is not None and not self.root.partial:
|
||||||
native = self.default
|
native = self.default
|
||||||
else:
|
else:
|
||||||
if self.required:
|
if self.required:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user