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

Sync entity map with specific lists #166

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

simleo
Copy link
Collaborator

@simleo simleo commented Oct 13, 2023

Fixes #165.

Fixes a problem that occurred when adding an entity with the same @id as an existing one. The new entity replaced the old one (in __entity_map) as stated in the docstring for add, but the old entity was still present in data_entities or contextual_entities. This PR changes default_entities, data_entities and contextual_entities in the ROCrate class to properties that return the appropriate list from __entity_map, which is now the single source of truth for what is or is not in the crate.

@simleo simleo merged commit f52f310 into ResearchObject:master Oct 13, 2023
12 checks passed
@simleo simleo deleted the add_no_duplicates branch October 13, 2023 12:45
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.

Raise an error, warning, or ignore duplicate ID's?
1 participant