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

Delete supplemental files when parent object is deleted #5939

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

masaball
Copy link
Contributor

Related issue: #5871

Do not merge until after 7.8 release.

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

This works for requests to delete MasterFiles but there are also requests to delete MediaObjects. (See

self.sections.each(&:delete)
)
Do you think it would work to move it into the MasterFile model?

app/jobs/bulk_action_jobs.rb Outdated Show resolved Hide resolved
cjcolvar
cjcolvar previously approved these changes Aug 26, 2024
Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

Looks great!

spec/controllers/master_files_controller_spec.rb Outdated Show resolved Hide resolved
Co-authored-by: Chris Colvard <chris.colvard@gmail.com>
@masaball masaball merged commit fd5f15b into develop Aug 27, 2024
2 checks passed
@masaball masaball deleted the child_file_delete branch August 27, 2024 13:56
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.

2 participants