Skip to content

Commit

Permalink
Fix MultipleChoiceField register
Browse files Browse the repository at this point in the history
  • Loading branch information
ulgens committed Aug 26, 2020
1 parent f0ca7b9 commit f04f777
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion graphene_django/forms/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,17 @@ def convert_form_field_to_float(field):
return Float(description=field.help_text, required=field.required)


@convert_form_field.register(forms.MultipleChoiceField)
@convert_form_field.register(forms.ModelMultipleChoiceField)
@convert_form_field.register(GlobalIDMultipleChoiceField)
def convert_form_field_to_list(field):
return List(ID, required=field.required)


@convert_form_field.register(forms.MultipleChoiceField)
def convert_form_field_to_string_list(field):
return List(String, required=field.required)


@convert_form_field.register(forms.DateField)
def convert_form_field_to_date(field):
return Date(description=field.help_text, required=field.required)
Expand Down

0 comments on commit f04f777

Please sign in to comment.