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 method hangs on raise ProtectedError, when a lot of related protected objects #230

Open
burrito-dev opened this issue Apr 4, 2023 · 1 comment

Comments

@burrito-dev
Copy link

My pc ran out of memory on this raise

I tried to delete object, that has about 500k related objects from 4 different model, where this relation has protected policy, I think that there is no need to use all of related objects in this raise

raise ProtectedError(

@Gagaro
Copy link
Member

Gagaro commented Apr 11, 2023

This actually come from Django: https://github.com/django/django/blob/main/django/db/models/deletion.py#L354-L363

Do you know where it hangs exactly? (collector.collect([self]), the raise itself?)

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

2 participants