Add explaining comment

This commit is contained in:
Yuri Prezument 2013-01-02 15:55:35 +02:00
parent 6b962cfcf7
commit 3873bc8a85

View File

@ -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'])