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

Set child's parent before on_bind_field #449

Merged

Conversation

@immerrr
Copy link
Contributor

commented May 3, 2016

This PR ensures that field_obj.parent and field_obj.name are set before on_bind_field hook is invoked.

Got bitten by this when trying to access nested.schema inside on_bind_field of the parent which triggered an early instantiation of the schema with parent still unset which meant it did not inherit the parent context (as implemented in #408).

@sloria

This comment has been minimized.

Copy link
Member

commented May 6, 2016

Thanks!

@sloria sloria merged commit 9a7cf1a into marshmallow-code:dev May 6, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sloria

This comment has been minimized.

Copy link
Member

commented May 6, 2016

Since this is the expected behavior and this is a minor change, I'll go ahead and backport this to the 2.7-line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.