File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
graphene_django/rest_framework Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def convert_serializer_field(
64
64
return graphql_type (* args , ** kwargs )
65
65
66
66
67
- def convert_serializer_to_input_type (serializer_class ):
67
+ def convert_serializer_to_input_type (serializer_class , convert_choices_to_enum = True ):
68
68
cached_type = convert_serializer_to_input_type .cache .get (
69
69
serializer_class .__name__ , None
70
70
)
@@ -73,7 +73,9 @@ def convert_serializer_to_input_type(serializer_class):
73
73
serializer = serializer_class ()
74
74
75
75
items = {
76
- name : convert_serializer_field (field )
76
+ name : convert_serializer_field (
77
+ field , convert_choices_to_enum = convert_choices_to_enum
78
+ )
77
79
for name , field in serializer .fields .items ()
78
80
}
79
81
ret_type = type (
You can’t perform that action at this time.
0 commit comments