How to remove username from replies after post is deleted?

Thanks, I just tried it and it works, but it’s pretty tedious to undelete each post, change the user, and then delete the new version of the post. I often have to do it many times for each content deletion request. Some of the core members like to delete old posts regularly, so it’s quite a bit of work.

Ideally, I’m looking to be able to do something like this:

# I would write a bookmarklet or browser extension that gets the
# post IDs from the current topic and generates the code to paste
# in the Rails console.
[123, 456, 789, 321, 432, 543].each do |post|
  # Is this next line safe or will it leave things dangling somewhere?
  post.reply_to_post_number = nil
  post.save
end

I’m hoping to find out if it’s safe to do that regularly.