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

Make bool form fields optional. #323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sergue1
Copy link
Contributor

@sergue1 sergue1 commented May 28, 2024

Fixes #277.

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sergue1,

Thanks for your contribution here! We're excited about this fix! I think we should go about the internals of the fix a bit differently, but the demo and tests look good.

@@ -154,7 +154,8 @@ def json_schema_obj_to_fields(
required = set(schema.get('required', []))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead make bool fields not required by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand, because this is what PR already implements: bool fields are not required. Maybe you mean with "not required by default" that there should be a possibility to make bool field required if necessary? Or set bool field to non required somewhere else, e.g. here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergue1,

Yeah my apologies, my feedback was a bit confusing. Let me dig around this weekend and see if I can better understand how we might be able to fix this in a slightly different way!

Great work so far!

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

Successfully merging this pull request may close these issues.

Boolean value in update form is always required
2 participants