mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 20:10:10 +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
|
||||
# them before saving the parent model instance.
|
||||
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]
|
||||
|
||||
# Update an existing instance...
|
||||
|
|
Loading…
Reference in New Issue
Block a user