Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Add allow_null serialization output note#5641
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carltongibson left a comment
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.
Thanks@rpkilby.
I'm basically +1 here, since there's always a degree of confusion as to how these flags interact.
Bottom line is (I guess) it's just complicated but until such a time as we can re-work things/docs to be clearer more detail is better.
| Normally an error will be raised if`None` is passed to a serializer field. Set this keyword argument to`True` if`None` should be considered a valid value. | ||
| Note that setting this argument to`True` will imply a default value of`null` for serialization output, but does imply a default for input deserialization. |
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.
Hi,
shouldn't this:
but does imply a default for input deserialization.be instead:
but does not imply a default for input deserialization.Sorry for the noise if I'm wrong :)
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.
Yep - that's definitely a typo.
From#5639, although I'm indifferent to its inclusion.