Remove product drive delete if any donations for product drive
Summary
Remove product drive delete capability if there are any donations for the product drive.
Why?
If someone deletes a product drive with donations attached, it breaks the donations page. It appears no one ever has used this function.
Details
The button in question can be seen by signing in as [email protected], then clicking "Community', then "Product Drives", then clicking "View" on one of the product drives.
Criteria for completion
- [ ] removal of product drive delete, as described above
- [ ] automated tests to confirm
I'd like to work on this issue
Please do!
This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.
Automatically unassigned after 7 days of inactivity.
There hasn't been any activity on the PR for this for a month, so we consider it open for someone to pick up and finish.
Hello, im open to finishing the PR if that is alright?
Yup!
Hi, sorry this took so long, I made the changes but cannot figure out how to push to an existing branch in someone else's fork, should I create a new PR?
That's a valid way to do it.
This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.
Automatically unassigned after 7 days of inactivity.
This has a PR in flight -- I've asked for a re-review of it.
If someone would take that PR the last mile, that'd be great!
I'd like to work on this issue.
Please do!
Hi, quick question!
I saw that the current PR uses the ProductDriveDestroyService to prevent deletion of ProductDrives with donations.
Personally, I think using the model association option dependent: :restrict_with_error would be a better fit — it’s simpler and easier to maintain.
What do you think?
Passing that one to @dorner
Hi @dorner, just following up to see what you think. Thanks!
@hagiya0121 I'm good with that!