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

fix: allow_inf_nan option for Param subclasses #11579

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pat-lasswell
Copy link

@pat-lasswell pat-lasswell commented May 15, 2024

There was a typo in the __init__ method of the Param class which misnamed the allow_inf_nan option in the kwargs passed to the underlying Pydantic FieldInfo initializer. This resulted in the validator failing to enforce the constraint, and hence inf and nan values were being passed to the route handler when they should not have.

See #11577 for the original question.

pat-lasswell and others added 2 commits May 15, 2024 06:53
There was a typo in the __init__ method of the Param class which
misnamed the allow_inf_nan option in the kwargs passed to the
underlying Pydantic FieldInfo initializer.  This resulted in the
validator failing to enforce the constraint, and hence inf and nan
values being passed to the route handler where they should not have.
@Kludex
Copy link
Sponsor Collaborator

Kludex commented May 15, 2024

@pat-lasswell
Copy link
Author

I just noticed that I put the test file in the root rather in the tests directory. I pushed a commit to fix that.

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 this pull request may close these issues.

None yet

2 participants