main ← zogstrip/permanently-delete-orphaned-about-topic
approved 05:52PM - 25 Sep 26 UTC
Previously, deleting a category trashed its About topic but left the first post …live, so `posts_count` stayed at 1 and permanent deletion failed with "This topic still has 0 posts…". Recovering a post in that trashed topic also raised a 500, because post voting's `is_post_voting_topic?` dereferenced the nil topic.
This change trashes the first post along with the topic, repairs existing topics with a post-deploy migration, and makes `is_post_voting_topic?` nil-safe.
https://meta.discourse.org/t/411015