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

Stopgap re deletion of donation sites #4208

Merged

Conversation

cielf
Copy link
Collaborator

@cielf cielf commented Mar 20, 2024

Partial (just a stop gap) re #4204

Description

This PR prevents the deletion of donation sites if they have donations.

Note that this is only preventing the deletion behind the scenes-- it is strictly a stopgap that we can put in "immediately" if the remainder of the work for #4204 is not yet ready. (I think the remainder of 4204 will be independent of this)

It is just restricting the deletion of the donation site to cases where there are no donations. It leaves the button in place. This is not by any means perfect, but will prevent the most egregious results.

I used restrict_with_error. I considered restrict_with_exception, which would "blow up" iin the bank user's face so they would know something was not right -- whereas this is going to die silently. I chose restrict_with_error because I didn't find any cases of restrict_with_exception in the codebase on search.

This is meant strictly to be a band-aid. Hopefully I will get at least the next step completed for this week as well.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

@cielf cielf requested a review from dorner March 20, 2024 18:30
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 to me!

@cielf cielf merged commit 6f4f67a into rubyforgood:main Mar 21, 2024
19 checks passed
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.

None yet

2 participants