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

Remove checkout records when referenced Media Object is deleted #6179

Open
masaball opened this issue Jan 24, 2025 · 0 comments
Open

Remove checkout records when referenced Media Object is deleted #6179

masaball opened this issue Jan 24, 2025 · 0 comments

Comments

@masaball
Copy link
Contributor

Currently there is no direct link between Checkout records in the database and the media object they are referencing. This results in checkouts potentially being orphaned when a media object is deleted. For the most part this should be harmless now that we have added handling to the checkouts display to skip these entries, but it would be good to have some mechanism for clearing these out.

Options would be:

  1. Implement a callback to delete checkout records when the parent media object is deleted.
  2. Implement a rake task to be run manually as needed
  3. Implement a rake task to be run via cron job (once a week?)

We do not have any public instances that use CDL but other institutions might, so if we choose option 1 we may still want to write a rake task to clear out any old entries that occurred before we implemented a fix.

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

No branches or pull requests

1 participant