From abff1e88d4abc2ecec23bdd91b37ef8b7915954a Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 21 Nov 2014 11:08:20 +1100 Subject: [PATCH] FIX: PM title not editable --- app/assets/javascripts/discourse/models/topic.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/topic.js b/app/assets/javascripts/discourse/models/topic.js index 08f669aa496..817376fbf21 100644 --- a/app/assets/javascripts/discourse/models/topic.js +++ b/app/assets/javascripts/discourse/models/topic.js @@ -207,9 +207,15 @@ Discourse.Topic = Discourse.Model.extend({ // Don't save unless we can if (!this.get('details.can_edit')) return; + var data = { title: this.get('title') }; + + if(this.get('category')){ + data.category_id = this.get('category.id'); + } + return Discourse.ajax(this.get('url'), { type: 'PUT', - data: { title: this.get('title'), category_id: this.get('category.id') } + data: data }); },