Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone id handling changes #304

Merged
merged 11 commits into from
Oct 26, 2018
Merged

Clone id handling changes #304

merged 11 commits into from
Oct 26, 2018

Conversation

mpsonntag
Copy link
Contributor

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.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 77.845% when pulling f99896f on mpsonntag:keepId into 040fe23 on G-Node:master.

Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jgrewe jgrewe merged commit 4ce2e1b into G-Node:master Oct 26, 2018
@mpsonntag mpsonntag deleted the keepId branch October 29, 2018 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clone id handling
4 participants