Skip to content

Allow nested fields to be missing #831

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

Merged
merged 1 commit into from
May 18, 2013
Merged

Allow nested fields to be missing #831

merged 1 commit into from
May 18, 2013

Conversation

brianz
Copy link
Contributor

@brianz brianz commented May 13, 2013

Serializer fields which are themselves serializers should not be required.
Specifically, if a nested object is set to "required=False", it should be
possible to serialize the main object and have the sub-object set to None/null.

Before this change, a nested field would throw a KeyError fields.get_component.

The new unit tests will fail without the change and all tests pass with this change.

Serializer fields which are themselves serializers should not be required.
Specifically, if a nested object is set to "required=False", it should be
possible to serialize the main object and have the sub-object set to None/null.
tomchristie added a commit that referenced this pull request May 18, 2013
Allow nested fields to be missing
@tomchristie tomchristie merged commit 6d425aa into encode:master May 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants