Skip to content

Commit

Permalink
Fix renaming in case a new section is needed
Browse files Browse the repository at this point in the history
Fixes #120
  • Loading branch information
dschwoerer committed Dec 2, 2024
1 parent 7ead497 commit 69e3e32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/boutdata/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def get_immediate_parent_and_child(path):

# Renaming a child key just within the same parent section, we can preserve
# the order
if new_parent is old_parent:
if new_parent is old_parent and ":" not in new_name:
new_parent._keys = rename_key(new_parent._keys, new_child, old_child)
new_parent.comments = rename_key(
new_parent.comments, new_child, old_child
Expand Down

0 comments on commit 69e3e32

Please sign in to comment.