mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Merge 1624213cc9
into d12005cf90
This commit is contained in:
commit
75b19a2912
|
@ -784,8 +784,7 @@ def raise_errors_on_nested_writes(method_name, serializer, validated_data):
|
||||||
# profile = ProfileSerializer()
|
# profile = ProfileSerializer()
|
||||||
assert not any(
|
assert not any(
|
||||||
isinstance(field, BaseSerializer) and
|
isinstance(field, BaseSerializer) and
|
||||||
(field.source in validated_data) and
|
(field.source in validated_data)
|
||||||
isinstance(validated_data[field.source], (list, dict))
|
|
||||||
for field in serializer._writable_fields
|
for field in serializer._writable_fields
|
||||||
), (
|
), (
|
||||||
'The `.{method_name}()` method does not support writable nested '
|
'The `.{method_name}()` method does not support writable nested '
|
||||||
|
|
Loading…
Reference in New Issue
Block a user