Skip to content

Commit 4ff93fc

Browse files
authored
Merge pull request #275 from lkuchenb/fix/remove_names
Fix accidential deletion of slot_usage
2 parents 91b7baa + a57c5e8 commit 4ff93fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

linkml_runtime/utils/schema_as_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _remove_names(obj: Any, parent: Optional[str]) -> Any:
4242
:return:
4343
"""
4444
if isinstance(obj, dict):
45-
return {k: _remove_names(v, k) for k, v in obj.items() if k != 'name' or parent is None or parent == 'slots'}
45+
return {k: _remove_names(v, k) for k, v in obj.items() if k != 'name' or parent is None or parent in ['slots', 'slot_usage']}
4646
elif isinstance(obj, list):
4747
return [_remove_names(x, parent) for x in obj]
4848
else:

0 commit comments

Comments
 (0)