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

item.delete(force_policy=HARD_DELETE) does not working. #201

Open
AlenSci opened this issue Feb 14, 2022 · 2 comments
Open

item.delete(force_policy=HARD_DELETE) does not working. #201

AlenSci opened this issue Feb 14, 2022 · 2 comments

Comments

@AlenSci
Copy link

AlenSci commented Feb 14, 2022

I have the following model

class User(SafeDeleteModel, AbstractUser, PermissionsMixin, BaseModel):
   name = models.CharField( blank=True, null=True, max_length=255)

I tried this.

from safedelete import HARD_DELETE, HARD_DELETE_NOCASCADE

item = User.objects.get(id=3)
item.delete(force_policy=HARD_DELETE)

but when I say User.objects.get(id=3) I am still getting the user instead of a 404 error.

@Gagaro
Copy link
Member

Gagaro commented Feb 14, 2022

I added this to the current hard delete test and it works fine: a462d37

What version of safedelete do you have? Are you overwriting the delete method of your model?

@AlenSci
Copy link
Author

AlenSci commented Feb 14, 2022

"version": "==1.1.2"

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