-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Bug: pydanticfactory_use_construct
is not propagated to the nested model.
#548
Labels
bug
Something isn't working
Comments
Hey @Reskov thanks for raising the issue! Yeah, this looks like a bug. We should be passing the configured value of |
Reskov
pushed a commit
to Reskov/polyfactory
that referenced
this issue
May 14, 2024
…o the nested model
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
polyfactory always do validation of the nested models, even if
factory_use_construct
are passed as a build argument.Possible workaround, but doesn't work well for multiple depth fields
model = NestedFactory.build(factory_use_construct=True, nested={"factory_use_construct": True} )
Is it possible to propagate
factory_use_construct
to the pydantic model fields by default?URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
No response
Logs
The text was updated successfully, but these errors were encountered: