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

refactor: perform comment soft_deletion #99

Merged
merged 4 commits into from
Dec 14, 2024

Conversation

moonlitgrace
Copy link
Contributor

@moonlitgrace moonlitgrace commented Dec 14, 2024

Soft deletion for comment model with custom CommentManager().
eg: CommentModel.objects.soft_delete(instance)

conditions:

  • hard-deletion for comments with no children
  • soft-deletion if has children

finally done a cleanup using CommentModel.objects.clean_up_soft_deleted()

closes #98

@moonlitgrace moonlitgrace marked this pull request as ready for review December 14, 2024 11:08
@moonlitgrace moonlitgrace changed the title refactor: comment perform soft-delete refactor: perform comment soft_deletion Dec 14, 2024
@moonlitgrace moonlitgrace merged commit 49a5b26 into main Dec 14, 2024
1 check passed
@moonlitgrace moonlitgrace deleted the refactor/comment-soft-delete branch December 14, 2024 11:09
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.

[Feature]: soft-deletion for comment model
1 participant