You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a parent schema the initialization value do get passed to the actual children schema.
Use case: I want to be able to bypass the classic post_loadmake_object when I init a partial schema.
There is a pull request for that, but it is 1 year old and has conflicts : #15
Problem in this PR is that arguments cannot be passed to both the child class and parent class constructor. For instance parameter only would trigger an exception since the parent schema has no field.
One simple workaround is to wrap type_schema in a method that takes care of child schema initialization, in the parent constructor. Here is what I do:
When using a parent schema the initialization value do get passed to the actual children schema.
Use case: I want to be able to bypass the classic post_load
make_object
when I init apartial
schema.The problem is that if a use a parent
OneOfSchema
the final schema is instantiated withou any init parameters. See here and here in marshmallowoneofschema/marshmallow_oneofschema/one_of_schema.pyThe text was updated successfully, but these errors were encountered: