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

soft delete for puzzles #831

Merged
merged 5 commits into from
Jan 3, 2025
Merged

soft delete for puzzles #831

merged 5 commits into from
Jan 3, 2025

Conversation

rawxfish
Copy link
Collaborator

@rawxfish rawxfish commented Dec 29, 2024

Makes puzzle, answers, and chatrooms models with soft deletion, so deletes are undoable. PuzzleTag is left as a normal model, because there are uniqueness constraints on them, but PuzzleTag.objects doesn't pick up soft deleted instances so would be sorta annoying to check every time we create a new tag that there isn't a soft deleted one already. Instead I handled deleting/restoring tags through signals.

Also adds 30 minute wait before cleaning up chats (fixes #548)

@rawxfish rawxfish force-pushed the soft_delete branch 2 times, most recently from 4cf4295 to eb31bf5 Compare December 31, 2024 08:24
@rawxfish rawxfish marked this pull request as ready for review January 1, 2025 08:00
@rawxfish rawxfish changed the title Soft delete soft delete for puzzles Jan 1, 2025
@rawxfish rawxfish requested review from asdfryan and rgossiaux January 1, 2025 08:11
@rawxfish rawxfish linked an issue Jan 1, 2025 that may be closed by this pull request
Copy link
Contributor

@rgossiaux rgossiaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, looks good to me I think

@rawxfish rawxfish merged commit 1a47211 into main Jan 3, 2025
2 checks passed
@rawxfish rawxfish deleted the soft_delete branch January 3, 2025 12:45
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.

Improve the deleted puzzles interaction Reconsider deleting chat channels when deleting a puzzle
2 participants