From 59da28bda49466fb8cdb68361a2034cdeb230197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 17 Feb 2015 23:10:34 +0100 Subject: [PATCH] FIX: editing a PM should never change the category_id --- app/assets/javascripts/discourse/models/topic.js.es6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/models/topic.js.es6 b/app/assets/javascripts/discourse/models/topic.js.es6 index cd134683a25..c2a4d0517db 100644 --- a/app/assets/javascripts/discourse/models/topic.js.es6 +++ b/app/assets/javascripts/discourse/models/topic.js.es6 @@ -365,6 +365,9 @@ Topic.reopenClass({ delete props.categoryId; } + // Make sure we never change the category for private messages + if (topic.get("isPrivateMessage")) { delete props.category_id; } + // Annoyingly, empty arrays are not sent across the wire. This // allows us to make a distinction between arrays that were not // sent and arrays that we specifically want to be empty.