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

on_delete should be a required parameter #66

Open
haerrel opened this issue Mar 31, 2023 · 2 comments
Open

on_delete should be a required parameter #66

haerrel opened this issue Mar 31, 2023 · 2 comments

Comments

@haerrel
Copy link

haerrel commented Mar 31, 2023

IMO the CurrentUserField should not have on_delete=CASCADE as a default parameter. Instead it should align with Django (3.2) ForeignKey field implementation, where the parameter for on_delete is required.

The current behaviour might lead to unwanted deletion if the user is deleted.

Thank you for considering my request.

@melboone
Copy link

I concur.
Working on an app where on_delete=models.PROTECT is the default option.

@DmytroLitvinov
Copy link

+1 for that.
Ready to add support for that new behavior.
We can add it with warning for transition for 3-6 months and then remove completely

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

3 participants