"extra fields not permitted" error when using Extra.forbid
on dataclass
property that's a dict
or list
of another dataclass
#4343
Labels
bug V1
Bug related to Pydantic V1.X
Initial Checks
Description
when instanciating a
dataclass
where a property is alist
ordict
of anotherdataclass
, it causes this error:Example Code
Python, Pydantic & OS Version
this issue seems to have been introduced after the 1.9.1 release. this occurred after installing the latest commit from master:
Affected Components
.dict()
and.json()
construct()
, pickling, private attributes, ORM modeThe text was updated successfully, but these errors were encountered: