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

Allow Organization and Partner Profile edit when associated records have validation errors #4737

Conversation

jp524
Copy link
Contributor

@jp524 jp524 commented Oct 26, 2024

Resolves #4720

Description

This solves the problem raised in the issue where Organizations could not be edited when an associated Partner Profile had an invalid pick-up email. Instead of rendering a 500 page, an error is shown to the user.
I can confirm that the validity of a Partner doesn't impact updating an Organization, unlike Partner Profile.

While looking at this issue I noticed that a Partner's email was not validated during the update process. It was only validated at creation.
I fixed this validation and also modified the Partner Profile update service to not fail if the Partner email was invalid.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Added a few tests in the update services.

Screenshots

Updating Partner Profile with invalid Partner
Invalid partner when updating partner profile

Updating Organization with invalid Partner Profile
Invalid partner profile when updating organization

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

I tried this against production data. At first I thought it wasn't working as expected, but it turns out that you only would get the problem if one of the flags that control the available request types is "No".
It looks fine to me from a functional pov. Still needs a technical review.

@cielf cielf requested a review from dorner October 29, 2024 18:11
Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Looks good here!

@dorner dorner merged commit fddd626 into rubyforgood:main Oct 30, 2024
11 checks passed
Copy link
Contributor

github-actions bot commented Nov 3, 2024

@jp524: Your PR Allow Organization and Partner Profile edit when associated records have validation errors is part of today's Human Essentials production release: 2024.11.03.
Thank you very much for your contribution!

@jp524 jp524 deleted the 4720-allow-organization-edit-with-partner-validation-error branch November 4, 2024 15:10
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.

[BUG]: Organization editing raises 500 errors when there is a partner validation issue
3 participants