We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a818a25 commit 1cb9c66Copy full SHA for 1cb9c66
graphene_django/rest_framework/serializer_converter.py
@@ -141,7 +141,7 @@ def convert_serializer_field_to_list_of_string(field):
141
142
143
@get_graphene_type_from_serializer_field.register(serializers.ChoiceField)
144
-def convert_serializer_field_to_list_of_string(field):
145
- #enums require a name
+def convert_serializer_field_to_enum(field):
+ # enums require a name
146
name = field.field_name or field.source or 'Choices'
147
return convert_choices_to_named_enum_with_descriptions(name, field.choices)
0 commit comments