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

[CRITICAL] Django UpdateQuery doesn't apply SafeDelete filter #242

Open
iamhssingh opened this issue Aug 28, 2024 · 1 comment
Open

[CRITICAL] Django UpdateQuery doesn't apply SafeDelete filter #242

iamhssingh opened this issue Aug 28, 2024 · 1 comment

Comments

@iamhssingh
Copy link

Problem Statement

When running Model.objects.update(), safe delete filter is not applied.

Reason

In case of .update (Ref: Django repo), the SafeDelete query class is replaced by UpdateQuery during query chain.

Exact line which replaces the class

So when get_compiler is called, SafeDeleteQuery.get_compiler is not called. (Introduced in #160 )

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
@iamhssingh and others