workaround for old pydantic version (#376)

This commit is contained in:
jonasBoss 2022-04-21 09:36:33 +02:00 committed by GitHub
parent d13b38ee1e
commit b931544650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,9 +141,9 @@ class Mapping(BaseModel):
return str(self.dict(exclude_defaults=True))
if needs_workaround:
# https://github.com/samuelcolvin/pydantic/issues/1383
def copy(self, *args, **kwargs) -> Mapping:
copy = super(Mapping, self).copy(*args, **kwargs)
copy = super(Mapping, self).copy(*args, deep=True, **kwargs)
object.__setattr__(copy, "_combination_changed", self._combination_changed)
return copy