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 I set a mode item to be a union of many others, instead of just checking it coerces the item to that Union, incorrectly. It's strange because I created the item using the correct model, but it totally ignores it and try to convert it to another class in the union. The code above explains it better.
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
Adding some non optional property that doesn't have in the last class makes this work, but it makes no sense why it's taking its content rather than the class (the type).
The text was updated successfully, but these errors were encountered:
When I set a mode item to be a union of many others, instead of just checking it coerces the item to that Union, incorrectly. It's strange because I created the item using the correct model, but it totally ignores it and try to convert it to another class in the union. The code above explains it better.
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:Bug
Minimal version
Longer version
Adding some non optional property that doesn't have in the last class makes this work, but it makes no sense why it's taking its content rather than the class (the type).
The text was updated successfully, but these errors were encountered: