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
The current implementation of OneOfSchema.load is causing me errors downstream due to heterogeneity of the type of objects being returned.
My particular issue was due to how result is constructed when there's a ValdidationError for many==False (have a look here).
In the current implementation, result ends up being nested in a list [{"type": "foo"}] when there is a ValidationError (through the valid_data attribute), and equal to the input when where's no error.
Secondly result is constructed in a what appears to be an overly convoluted way where result gets set, then appended to a different variable that the overwrites the result....
I would gladly make a PR with a refactored version of OneOfSchema.load if that's allowed?
The text was updated successfully, but these errors were encountered:
Hi there,
The current implementation of
OneOfSchema.load
is causing me errors downstream due to heterogeneity of the type of objects being returned.My particular issue was due to how
result
is constructed when there's aValdidationError
formany==False
(have a look here).In the current implementation,
result
ends up being nested in a list[{"type": "foo"}]
when there is a ValidationError (through the valid_data attribute), and equal to the input when where's no error.Secondly
result
is constructed in a what appears to be an overly convoluted way where result gets set, then appended to a different variable that the overwrites the result....I would gladly make a PR with a refactored version of
OneOfSchema.load
if that's allowed?The text was updated successfully, but these errors were encountered: