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

Soft-delete attachments when link is removed. #4672

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

jrobbins
Copy link
Collaborator

@jrobbins jrobbins commented Jan 8, 2025

This should resolve #4630.

When the user removes the link to an attachment and saves the change, the attachment itself is marked deleted (and is no longer viewable).

In this PR:

  • Add logic to take a post-PATCH action when the screenshot_links field is edited.
  • Implement a helper function to mark those attachments deleted.
  • Add unit tests.
  • Also, make the SLO reminder emails tests more robust because other tests can change the specific NDB ID numbers that occur in the URLs in the golden.

@jrobbins jrobbins requested a review from KyleJu January 8, 2025 01:45
@jrobbins jrobbins merged commit 10fe4a2 into main Jan 8, 2025
7 checks passed
@jrobbins jrobbins deleted the 20250107-delete-attachments-when-link-is-removed branch January 8, 2025 20:27
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.

Implement UI for deleting hosted image attachments
2 participants