Repository navigation
fix: preserve false values in model fields - #811
Merged
Merged
Conversation
|
Confirming from Snapdocs: we tested #811 int two Rails apps against our Auth0 dev tenant and it fixes this for us. |
nandan-bhat
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Model#initializeresolved each field with||, so an explicitfalsewas treated as absent and never reached the model data. Every boolean set tofalsewas dropped fromto_hon requests and read back asnilon responses. For example,users.update(id:, blocked: false)sent an emptyPATCHbody and the tenant rejected it with a400.Changes
lib/auth0/internal/types/model.rbnow decides presence withkey?andnil?. The literal and default fallback applies only when the value isnil, and a field declared withdefault: falsenow falls back tofalse.lib/auth0/internal/is listed in.fernignore, so the change is applied here directly.References
falsevalue — booleans are silently lost on requests and responses #800Testing
Checklist