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 @@ -57,9 +57,14 @@ def convert_form_field_to_float(field):
57
57
return Float (description = field .help_text , required = field .required )
58
58
59
59
60
+ @convert_form_field .register (forms .MultipleChoiceField )
61
+ def convert_form_field_to_string_list (field ):
62
+ return List (String , description = field .help_text , required = field .required )
63
+
64
+
60
65
@convert_form_field .register (forms .ModelMultipleChoiceField )
61
66
@convert_form_field .register (GlobalIDMultipleChoiceField )
62
- def convert_form_field_to_list (field ):
67
+ def convert_form_field_to_id_list (field ):
63
68
return List (ID , required = field .required )
64
69
65
70
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