Skip to content

Commit 02fcf6a

Browse files
SerenityCodetomchristie
authored andcommitted
Use field name instead of source when generating docs (encode#4559)
1 parent 7f29cfc commit 02fcf6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ def get_serializer_fields(self, path, method, view):
477477
required = field.required and method != 'PATCH'
478478
description = force_text(field.help_text) if field.help_text else ''
479479
field = coreapi.Field(
480-
name=field.source,
480+
name=field.field_name,
481481
location='form',
482482
required=required,
483483
description=description,

0 commit comments

Comments
 (0)