Fix introspection of list field in schema

This commit is contained in:
Lim H 2017-08-12 18:59:03 +01:00 committed by GitHub
parent e80b78d1cb
commit 32a0b62508

View File

@ -30,7 +30,7 @@ def field_to_schema(field):
title = force_text(field.label) if field.label else '' title = force_text(field.label) if field.label else ''
description = force_text(field.help_text) if field.help_text else '' description = force_text(field.help_text) if field.help_text else ''
if isinstance(field, serializers.ListSerializer): if isinstance(field, (serializers.ListSerializer, serializers.ListField)):
child_schema = field_to_schema(field.child) child_schema = field_to_schema(field.child)
return coreschema.Array( return coreschema.Array(
items=child_schema, items=child_schema,