A platform for community discussion. Free, open, simple.
FIX: Hijack controller for topic move posts (#31029)
Martin Brennaned316b40a403
diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rbindex 07de1538911..29c17307c9d 100644--- a/app/controllers/topics_controller.rb+++ b/app/controllers/topics_controller.rb@@ -914,10 +914,12 @@ class TopicsController < ApplicationControllerendend- destination_topic = move_posts_to_destination(topic)- render_topic_changes(destination_topic)- rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved => ex- render_json_error(ex)+ hijack do+ destination_topic = move_posts_to_destination(topic)+ render_topic_changes(destination_topic)+ rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved => ex+ render_json_error(ex)+ endenddef change_post_owners