-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add hard delete action #151
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
Could you review my comments. Also add a line in CHANGES and check the CI to fix the errors you have.
👍
|
||
if changed: | ||
for obj in queryset: | ||
obj.delete(force_policy=HARD_DELETE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to call the base QuerySet delete to delete in bulk, otherwise it could be very long.
else: | ||
self.message_user( | ||
request, | ||
"No permission for hard delete. Execute soft delete first.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this to something more explicit such as: "You need to soft delete first in order to hard delete an object."
7a52a2a
to
0a0daba
Compare
Would be nice if u could finish this topic after two years^^ |
No description provided.