We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fd5a3e commit e698170Copy full SHA for e698170
linkml_runtime/dumpers/yaml_dumper.py
@@ -13,7 +13,7 @@ def dumps(self, element: Union[BaseModel, YAMLRoot], **kwargs) -> str:
13
# Internal note: remove_empty_items will also convert Decimals to int/float;
14
# this is necessary until https://github.com/yaml/pyyaml/pull/372 is merged
15
16
- dumper_safe_element = element.dict() if isinstance(element, BaseModel) else element
+ dumper_safe_element = element.model_dump() if isinstance(element, BaseModel) else element
17
return yaml.dump(remove_empty_items(dumper_safe_element, hide_protected_keys=True),
18
Dumper=yaml.SafeDumper, sort_keys=False,
19
allow_unicode=True,
0 commit comments