◐ Shell
clean mode source ↗

Clone id handling changes by mpsonntag · Pull Request #304 · G-Node/python-odml

This PR closes #258 and #259.

When cloning a Section or a Property by default the id of any object is changed to a new UUID. The cloning methods now feature a new keep_id attribute. If set to True, the cloned object and any cloned children retain their original id. This is meant to enable the creation of exact copies of Section-Property trees in different documents.

With the introduction of new validation checks for identical ids within a document in PR #303 a document cannot be saved, if a cloned object with a kept id is added ensuring that ids remain unique within a document.