File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,14 @@ def convert_form_field_to_float(field):
55
55
return Float (description = field .help_text , required = field .required )
56
56
57
57
58
+ @convert_form_field .register (forms .MultipleChoiceField )
59
+ def convert_form_field_to_string_list (field ):
60
+ return List (String , description = field .help_text , required = field .required )
61
+
62
+
58
63
@convert_form_field .register (forms .ModelMultipleChoiceField )
59
64
@convert_form_field .register (GlobalIDMultipleChoiceField )
60
- def convert_form_field_to_list (field ):
65
+ def convert_form_field_to_id_list (field ):
61
66
return List (ID , required = field .required )
62
67
63
68
Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ def test_should_choice_convert_string():
66
66
assert_conversion (forms .ChoiceField , String )
67
67
68
68
69
+ def test_should_multiple_choice_convert_list ():
70
+ assert_conversion (forms .MultipleChoiceField , List )
71
+
72
+
69
73
def test_should_base_field_convert_string ():
70
74
assert_conversion (forms .Field , String )
71
75
You can’t perform that action at this time.
0 commit comments