From 3873bc8a857829a12b2bb6a34610ab5295887660 Mon Sep 17 00:00:00 2001 From: Yuri Prezument Date: Wed, 2 Jan 2013 15:55:35 +0200 Subject: [PATCH] Add explaining comment --- rest_framework/fields.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 47bdc26aa..5ae8ff485 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -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'])