Use field name instead of source when generating docs (#4559)

This commit is contained in:
SerenityCode 2016-10-12 09:46:59 +01:00 committed by Tom Christie
parent 7f29cfc931
commit 02fcf6a334

View File

@ -477,7 +477,7 @@ class SchemaGenerator(object):
required = field.required and method != 'PATCH' required = field.required and method != 'PATCH'
description = force_text(field.help_text) if field.help_text else '' description = force_text(field.help_text) if field.help_text else ''
field = coreapi.Field( field = coreapi.Field(
name=field.source, name=field.field_name,
location='form', location='form',
required=required, required=required,
description=description, description=description,