mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Fix possible nested array fields
This commit is contained in:
parent
720d154c83
commit
c696b0ba0c
|
@ -998,7 +998,7 @@ class ModelSerializer(Serializer):
|
||||||
field_kwargs.pop('allow_blank', None)
|
field_kwargs.pop('allow_blank', None)
|
||||||
|
|
||||||
if postgres_fields and isinstance(model_field, postgres_fields.ArrayField):
|
if postgres_fields and isinstance(model_field, postgres_fields.ArrayField):
|
||||||
child_model_field = model_field.base_field.base_field
|
child_model_field = model_field.base_field
|
||||||
child_field_class, child_field_kwargs = self.build_standard_field(
|
child_field_class, child_field_kwargs = self.build_standard_field(
|
||||||
'child', child_model_field
|
'child', child_model_field
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user