-
Notifications
You must be signed in to change notification settings - Fork 52
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
Use _.isNaN for integer required validation instead of _.isEmpty #410
Use _.isNaN for integer required validation instead of _.isEmpty #410
Conversation
0fa6710
to
16fab43
Compare
Cool, I think we need this to go back to hammer? |
16fab43
to
f7ff2cb
Compare
@miq-bot add_label hammer/yes |
@miq-bot add_label ivanchuk/yes, bug |
@d-m-u Cannot apply the following label because they are not recognized: dialog_user |
f7ff2cb
to
7977073
Compare
Checked commit eclarizio@7977073 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
verified fix in UI.
…-value Use _.isNaN for integer required validation instead of _.isEmpty (cherry picked from commit 485efda) https://bugzilla.redhat.com/show_bug.cgi?id=1748455
Hammer backport details:
|
…-value Use _.isNaN for integer required validation instead of _.isEmpty (cherry picked from commit 485efda) https://bugzilla.redhat.com/show_bug.cgi?id=1740899
Ivanchuk backport details:
|
When determining if a field has a value filled out, when the
data_type
is integer, we're still attempting to do a_.isEmpty
check, which will always fail for integers since they are not an enumerable type. Instead, we should use_.isNaN
for integers. Alternatively we could refactor this into our own_.isBlank
and use that instead, but for now this fixes the problem.Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1740899
@miq-bot assign @h-kataria
@h-kataria @d-m-u Please Review since @himdel is on PTO.