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

Source-folio-sequence uniqueness requirement #1713

Open
dchiller opened this issue Nov 19, 2024 · 0 comments
Open

Source-folio-sequence uniqueness requirement #1713

dchiller opened this issue Nov 19, 2024 · 0 comments

Comments

@dchiller
Copy link
Contributor

dchiller commented Nov 19, 2024

This requirement is currently tested in the form_valid method of the ChantCreateView. It is not tested at all for any other chant editing methods (either the Admin panel or the ChantEditView), and indeed, this method is the wrong place for this kind of validation (the validation should occur on the form and not on the view). Eventually, this would be a good place for a uniqueness constraint on the model itself, but there is messy data currently.

We'll use #1714 to fix this data and then add a model uniqueness constraint. In the meantime, I'll move these validations to a form method.

@dchiller dchiller changed the title Chant edit: uniqueness requirement for folio-sequence is not tested Source-folio-sequence uniqueness requirement Nov 21, 2024
dchiller added a commit to dchiller/CantusDB that referenced this issue Nov 21, 2024
Moves validity checks on the Chant Create view to the Chant Create Form.

Refs: DDMAL#1713.
dchiller added a commit to dchiller/CantusDB that referenced this issue Dec 3, 2024
Moves validity checks on the Chant Create view to the Chant Create Form.

Refs: DDMAL#1713.
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

No branches or pull requests

1 participant