Skip to content

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

Open
@avilaton

Description

@avilaton
    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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions