mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 16:41:18 +08:00
FIX: Posting was showing errors due to misfiring wiki observer
This commit is contained in:
parent
08b4b7b7ff
commit
43669f7b24
|
@ -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);
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user