Are nested dataclasses form submissions supported? #194
iamyojimbo
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When posting form data to an endpoint and using that to populate a dataclass, are nested data classes supported?
I can make the below, self-contained example work like this:
but I can't find a configuration to make it work when adding a nested property to
State
, which is also a dataclass. Here's the full example:When changing any of the nested fields, a and b, the JSON updates, but always has the initial values 3 and 4. Is there any way to also have those be supported. Looking at the source here, I assume not, because fill_dataclass is not recursive.
Thanks for the awesome library, and thanks in advance for any help!
Beta Was this translation helpful? Give feedback.
All reactions