Skip to content

Add allow_null serialization output note #5641

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 1, 2017

Conversation

rpkilby
Copy link
Member

@rpkilby rpkilby commented Dec 1, 2017

From #5639, although I'm indifferent to its inclusion.

Copy link
Collaborator

@carltongibson carltongibson left a 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.

@carltongibson carltongibson added this to the v3.7.4 milestone Dec 1, 2017
@carltongibson carltongibson merged commit 5f42cb7 into encode:master Dec 1, 2017
@rpkilby rpkilby deleted the allow-null-default-docs branch December 1, 2017 09:11
@@ -45,6 +45,8 @@ Defaults to `True`.

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.

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 :)

Copy link
Member Author

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.

pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants