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

Validate name uniqueness, but be aware of revision context #864

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

acoffman
Copy link
Member

@acoffman acoffman commented Aug 4, 2023

Previously we had added a unique validation for MP and Variant names. Unfortunately, this broke validation when proposing revisions, as the way we validate those is to new up a copy with the revisions applied and run the validations.

This would always result in a duplicate name failure, so we had to back off the validation for that case as a temporary fix.

This introduces a more permanent fix. All Moderated entities now have an in_revision_validation_context. This will be set to true when the object is the result of a revision proposal and validations can take that into account in their logic.

As a result, the name validation can function appropriately.

closes #863

@acoffman acoffman added the bugfix PR Label for bug fixes. Will appear in release notes. label Aug 4, 2023
@acoffman acoffman merged commit 8577c3e into main Aug 4, 2023
5 checks passed
@acoffman acoffman deleted the additional-name-validation-logic branch August 4, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix PR Label for bug fixes. Will appear in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate variants and molecular profiles
1 participant