Skip to content
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

Nested field allow_none=True is not considered in definitions #121

Open
avilaton opened this issue Sep 4, 2020 · 0 comments · May be fixed by #122
Open

Nested field allow_none=True is not considered in definitions #121

avilaton opened this issue Sep 4, 2020 · 0 comments · May be fixed by #122

Comments

@avilaton
Copy link
Contributor

avilaton commented Sep 4, 2020

    class ChildSchema(Schema):
        id = fields.Integer(required=True)

    class TestSchema(Schema):
        id = fields.Integer(required=True)
        nested_fld = fields.Nested(ChildSchema, allow_none=True)

    schema = TestSchema()

    dumped = validate_and_dump(schema)

should result on a schema that allows the nested_fld to either conform to ChildSchema or to be None.

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 a pull request may close this issue.

1 participant