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

Check for duplicates in taxonomy admin #1928

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Check for duplicates in taxonomy admin #1928

merged 2 commits into from
Jul 24, 2024

Conversation

actlikewill
Copy link
Contributor

@actlikewill actlikewill commented Jul 23, 2024

This bug occurs when adding a dupilcate taxonomy from the admin.
Adding validation via clean on the model doesn't work as expected, because treebeard has some extra logic in the save method in MoveNodeForm. it ends up overriding the native behaviour that catches validation errors thrown from the model. Having the logic on the form works better, with some extra work to get the appropriate parent to validate the slug.

closes #1915

@actlikewill actlikewill marked this pull request as ready for review July 23, 2024 10:49
@actlikewill actlikewill merged commit 69e3368 into main Jul 24, 2024
9 checks passed
@actlikewill actlikewill deleted the taxonomy-admin branch July 24, 2024 01:46
Copy link

sentry-io bot commented Aug 1, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ KeyError: 'name' /admin/peachjam/taxonomy/add/ View Issue

Did you find this useful? React with a 👍 or 👎

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.

IntegrityError: duplicate key value violates unique constraint "peachjam_taxonomy_slug_39b59d2c_uniq"
2 participants