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

Fixing issue with required bool fields #461

Merged
merged 6 commits into from
Sep 18, 2020
Merged

Fixing issue with required bool fields #461

merged 6 commits into from
Sep 18, 2020

Conversation

jwoertink
Copy link
Member

Fixes #457

Thanks to @akadusei for catching this and the suggested fix.

If you had a Boolean field and the default value was already set to false, but your operation had a validate_required on that field, the update would fail. This wasn't the case if you removed the validation. This PR fixes that.

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

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

A few small comments. LGTM

spec/support/boxes/model_with_default_values_box.cr Outdated Show resolved Hide resolved
spec/save_operation_spec.cr Outdated Show resolved Hide resolved
spec/save_operation_spec.cr Outdated Show resolved Hide resolved
spec/save_operation_spec.cr Outdated Show resolved Hide resolved
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.

Updating a record fails if a column has original value of false
2 participants