FIX: Posting was showing errors due to misfiring wiki observer

This commit is contained in:
Robin Ward 2015-04-15 17:54:46 -04:00
parent 08b4b7b7ff
commit 43669f7b24
2 changed files with 4 additions and 8 deletions

View File

@ -487,7 +487,8 @@ const Composer = RestModel.extend({
moderator: user.get('moderator'), moderator: user.get('moderator'),
admin: user.get('admin'), admin: user.get('admin'),
yours: true, yours: true,
read: true read: true,
wiki: false
}); });
this.serialize(_create_serializer, createdPost); this.serialize(_create_serializer, createdPost);

View File

@ -1,4 +1,5 @@
import RestModel from 'discourse/models/rest'; import RestModel from 'discourse/models/rest';
import { popupAjaxError } from 'discourse/lib/ajax-error';
const Post = RestModel.extend({ const Post = RestModel.extend({
@ -79,13 +80,7 @@ const Post = RestModel.extend({
data: data data: data
}).then(function () { }).then(function () {
self.incrementProperty("version"); self.incrementProperty("version");
}, function (error) { }).catch(popupAjaxError);
if (error && error.responseText) {
bootbox.alert($.parseJSON(error.responseText).errors[0]);
} else {
bootbox.alert(I18n.t("generic_error"));
}
});
}, },
internalLinks: function() { internalLinks: function() {