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

Add hard delete action #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

helena238
Copy link

No description provided.

Copy link
Member

@Gagaro Gagaro left a 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)
Copy link
Member

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.",
Copy link
Member

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."

@Gagaro Gagaro force-pushed the master branch 2 times, most recently from 7a52a2a to 0a0daba Compare August 17, 2022 09:01
@Jan-Heussner
Copy link

Would be nice if u could finish this topic after two years^^

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

Successfully merging this pull request may close these issues.

3 participants