FIX: rake categories:move_topics shouldn't move category description topic (#14797)

FIX: rake categories:move_topics shouldn’t move category description topic (#14797)

diff --git a/lib/tasks/categories.rake b/lib/tasks/categories.rake
index a3d5895..88430a7 100644
--- a/lib/tasks/categories.rake
+++ b/lib/tasks/categories.rake
@@ -14,7 +14,12 @@ task "categories:move_topics", [:from_category, :to_category] => [:environment] 
 
   if from_category.present? && to_category.present?
     puts "Moving topics from #{from_category.slug} to #{to_category.slug}..."
-    Topic.where(category_id: from_category.id).update_all(category_id: to_category.id)
+
+    Topic
+      .where(category_id: from_category.id)
+      .where.not(id: from_category.topic_id)
+      .update_all(category_id: to_category.id)
+
     from_category.update_attribute(:topic_count, 0)
 
     puts "Updating category stats..."

GitHub sha: 3254d35078b14655cf3c8a51f443b81534902400

This commit appears in #14797 which was approved by tgxworld. It was merged by tgxworld.