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

added validator for sample.direct_ancestor_uuid and datasets.direct_ancestor_uuids which prevents an entity's own uuid from being included in direc_ancestor_uuid(s) during a put call #712

Merged

Conversation

DerekFurstPitt
Copy link
Contributor

No description provided.

…ncestor_uuids which prevents an entity's own uuid from being included in direc_ancestor_uuid(s) during a put call
src/schema/provenance_schema.yaml Show resolved Hide resolved
src/schema/provenance_schema.yaml Show resolved Hide resolved
entity_uuid = existing_data_dict.get("uuid")
if property_key == 'direct_ancestor_uuid':
ancestors = new_data_dict.get('direct_ancestor_uuid')
elif property_key == 'direct_ancestor_uuids':
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to check the name of the property_key, as long as this validator is defined in the yaml for the given field, it'll be only for that field name.

@yuanzhou yuanzhou merged commit c9d986d into dev-integrate Aug 2, 2024
3 checks passed
@yuanzhou yuanzhou deleted the Derek-Furst/validate-entityid-not-in-ancestor branch August 8, 2024 04:21
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.

2 participants