FIX: Wiki editing was broken due to extra topic update

This commit is contained in:
Robin Ward 2015-01-30 18:01:53 -05:00
parent f923d7e205
commit d7b7ec9e0a

View file

@ -472,7 +472,10 @@ Discourse.Composer = Discourse.Model.extend({
// Update the title if we've changed it, otherwise consider it a
// successful resolved promise
if (this.get('title') && post.get('post_number') === 1) {
if (this.get('title') &&
post.get('post_number') === 1 &&
this.get('topic.details.can_edit')) {
var topicProps = this.getProperties(Object.keys(_edit_topic_serializer));
promise = Discourse.Topic.update(this.get('topic'), topicProps);
} else {