Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why convert_form_field_to_boolean always give a required field? #532

Closed
NateScarlet opened this issue Oct 11, 2018 · 4 comments
Closed

Why convert_form_field_to_boolean always give a required field? #532

NateScarlet opened this issue Oct 11, 2018 · 4 comments

Comments

@NateScarlet
Copy link

NateScarlet commented Oct 11, 2018

image
That makes DjangoModelFormMutation got strange schema even i changed required attribute on db field.

return Boolean(description=field.help_text, required=True)

@NateScarlet NateScarlet changed the title Why convert_form_field_to_boolean always get required field? Why convert_form_field_to_boolean always give a required field? Oct 11, 2018
@NateScarlet
Copy link
Author

NateScarlet commented Dec 24, 2018

Found out that i can turn field to nullable by use:

converted = convert_form_field(field, *args, **kwargs)
converted.kwargs['required'] = False

@dopeboy
Copy link

dopeboy commented May 8, 2019

Did you reach a satisfactory resolution here @NateScarlet?

@NateScarlet
Copy link
Author

@dopeboy
Copy link

dopeboy commented May 8, 2019

Really appreciate your enthusiasm to improving our community, @NateScarlet. I'll close down this issue since it seems you found (created!) your own solution.

Separately, we'd love to bring your talents into the fold. If there's a feature request / enhancement / bug you feel should be resolved in the main project, please engage us.

@dopeboy dopeboy closed this as completed May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants