mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 04:20:12 +03:00
Correct nested serializer assumption
This commit is contained in:
parent
5e440a40ba
commit
3f1b91d157
|
@ -943,7 +943,7 @@ class ModelSerializer(Serializer):
|
||||||
# Nested forward relations - These need to be marked so we can save
|
# Nested forward relations - These need to be marked so we can save
|
||||||
# them before saving the parent model instance.
|
# them before saving the parent model instance.
|
||||||
for field_name in attrs.keys():
|
for field_name in attrs.keys():
|
||||||
if isinstance(self.fields.get(field_name, None), Serializer):
|
if isinstance(self.fields.get(field_name, None), ModelSerializer):
|
||||||
nested_forward_relations[field_name] = attrs[field_name]
|
nested_forward_relations[field_name] = attrs[field_name]
|
||||||
|
|
||||||
# Update an existing instance...
|
# Update an existing instance...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user