mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 05:20:12 +03:00
Don't skip fields if there is an error
This commit is contained in:
parent
39658f1bf4
commit
b506b3161d
|
@ -415,8 +415,6 @@ class Field(object):
|
||||||
try:
|
try:
|
||||||
return get_attribute(instance, self.source_attrs)
|
return get_attribute(instance, self.source_attrs)
|
||||||
except (KeyError, AttributeError) as exc:
|
except (KeyError, AttributeError) as exc:
|
||||||
if not self.required and self.default is empty:
|
|
||||||
raise SkipField()
|
|
||||||
msg = (
|
msg = (
|
||||||
'Got {exc_type} when attempting to get a value for field '
|
'Got {exc_type} when attempting to get a value for field '
|
||||||
'`{field}` on serializer `{serializer}`.\nThe serializer '
|
'`{field}` on serializer `{serializer}`.\nThe serializer '
|
||||||
|
|
Loading…
Reference in New Issue
Block a user