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

Fix broken deletion of questions #640

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

fosterfarrell9
Copy link
Collaborator

This fixes #639 by removing the redundant after_destroy callback in the Medium model.

@fosterfarrell9 fosterfarrell9 changed the title Remove redundant after_destroy callback Fix broken deletion of questions May 14, 2024

This comment was marked as off-topic.

Copy link
Member

@Splines Splines left a comment

Choose a reason for hiding this comment

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

  • On the questions/edit page, I'm still able to delete questions after the changes provided by you in this PR. But that also works locally even before your changes. Were you able to reproduce the error shown in Deletion of questions is broken #639 locally? I haven't found out how to do it yet.
  • If only one question is left and I try to delete it, I get an error (before and after your change). But this is probably not related to this issue here and another bug, right?

Copy link
Member

@Splines Splines left a comment

Choose a reason for hiding this comment

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

I missed that I have to delete the medium itself, not just one of its questions 🙈. I can now confirm that without the code change in this PR, we get the error discussed in #639. After the change, I could successfully delete media with a question that contains multiple answers, without encountering the "frozen hash literal" error again.

@Splines
Copy link
Member

Splines commented May 27, 2024

Use Squash and merge to merge into dev.

@fosterfarrell9 fosterfarrell9 merged commit 35912c5 into dev May 28, 2024
6 checks passed
@fosterfarrell9 fosterfarrell9 deleted the fix/destroy-questions branch May 28, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants