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

Bulk delete image doesn't decrement EntityCounters #920

Open
donaldgray opened this issue Nov 18, 2024 · 1 comment
Open

Bulk delete image doesn't decrement EntityCounters #920

donaldgray opened this issue Nov 18, 2024 · 1 comment
Labels
API https://dlcs-book.readthedocs.io/en/latest/ bug Something isn't working

Comments

@donaldgray
Copy link
Member

When deleting a single images EntityCounter(s) are decremented and related records are deleted too (ImageStorage/ImageLocation etc) but this isn't happening for bulk deletes.

@donaldgray donaldgray added bug Something isn't working API https://dlcs-book.readthedocs.io/en/latest/ labels Nov 18, 2024
@donaldgray
Copy link
Member Author

Note - this may best resolved by having the cleanup handler remove storage + location records. Delete handler would need to decrement EC counter, although recalculator logic would tidy up.

A better option would be to enforce referential integrity and use cascade delete on child records, although orphans would need to be cleaned up first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API https://dlcs-book.readthedocs.io/en/latest/ bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant