Bugfix: FormMutation was always causing boolean fields to be required (#613)

Bugfix: FormMutation was always causing boolean fields to be required
This commit is contained in:
Mel van Londen 2019-05-09 11:47:47 -07:00 committed by GitHub
commit 865c9535b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ def convert_form_field_to_int(field):
@convert_form_field.register(forms.BooleanField) @convert_form_field.register(forms.BooleanField)
def convert_form_field_to_boolean(field): def convert_form_field_to_boolean(field):
return Boolean(description=field.help_text, required=True) return Boolean(description=field.help_text, required=field.required)
@convert_form_field.register(forms.NullBooleanField) @convert_form_field.register(forms.NullBooleanField)