adding also values that are not part of the dataclass to the "TContainer" while parsing
This commit is contained in:
parent
419353c712
commit
8be150b090
1 changed files with 3 additions and 0 deletions
|
|
@ -142,6 +142,9 @@ class _TStruct(Adapter[t.Any, t.Any, ContainerType, BuildTypes]):
|
|||
value = getattr(obj, field.name)
|
||||
setattr(dc, field.name, value)
|
||||
|
||||
# also transfer values that are not part of the dataclass
|
||||
dc.update(obj)
|
||||
|
||||
return dc
|
||||
|
||||
def _encode(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue