-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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: saveSettings endpoint allowing NaN to be stored on Int settings #32428
Conversation
🦋 Changeset detectedLatest commit: 757b386 The changes in this PR will be included in the next version bump. This PR includes changesets to release 32 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Looks like this PR is ready to merge! 🎉 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #32428 +/- ##
========================================
Coverage 55.15% 55.15%
========================================
Files 2397 2394 -3
Lines 53221 53186 -35
Branches 10952 10948 -4
========================================
- Hits 29353 29337 -16
+ Misses 21275 21266 -9
+ Partials 2593 2583 -10
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Could you please add an API end-to-end test for this? I believe you could use the settings/:_id
POST endpoint
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.
the value is fetched from db, and looks like can possibly be NaN. this tells me the save action is what should always set empty number setting type values to zero, and not be handled as an exception for this specific method.
please help me if I'm missing something.
nvm I was rushing my review and misread, sorry.
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
e947932
CORE-418
Fixes issue that allowed empty strings to be saved in the int settings, causing an NaN value on the DB