-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix #9440 - Forcing default null value for numeric core fields. #9524
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each of the four core number-type fields are rending as "null" when saved as empty now.
I have noticed that this same initial issue happens for other field-types too (ie, saving as " ", rather than NULL):
However, I assume this is fine as-is. (As the difference between 0 and NULL for numbers is more distinct)
Assuming this is okay, LGTM!
I think I fix this like this since years (I tried to integrate that in the original Sugar years ago)
|
Rebased branch to hotfix from #9441
Closes #9440
Description
As described in the issue, non-custom/core non-required numeric fields aren't saving properly a default empty value in newly created modules.
Motivation and Context
(int) and (float) summoning always return 0 if the value is empty. Therefore we add a condition to return "null" if it's empty.
How To Test This
Types of changes
Final checklist