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

Bug: clear contact types in update #6118

Conversation

thejonroberts
Copy link
Contributor

What github issue is this PR for, if any?

Resolves #6117

What changed, and why?

See Issue and/or bugsnag, which I cannot access.

Used the existing CaseContact#update_cleaning_contact_types method to clear contact types before update (within a transaction). I am just guessing that this is why that method exists, to prevent the CaseContactContactType validates :case_contact_id, uniqueness: {scope: :contact_type_id from causing this issue. There is probably a 'better' way to handle these, but without more info about the data or how to reproduce, I just wanted to try something quick.

How is this tested? (please write tests!) 💖💪

I could not reproduce the issue in the new/edit system specs. I don't know exactly what is happening with the production data. So this is current specs only.

@github-actions github-actions bot added the ruby Pull requests that update Ruby code label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Case Contact Form Validation failure
1 participant