mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
Merge pull request #3785 from jaswilli/post-status
Revert post status on failed save.
This commit is contained in:
commit
8edbaa9ae0
@ -11,9 +11,6 @@ var EditorNewController = Ember.ObjectController.extend(EditorControllerMixin, {
|
||||
if (model.get('id')) {
|
||||
self.transitionToRoute('editor.edit', model);
|
||||
}
|
||||
}).catch(function () {
|
||||
// Publishing failed
|
||||
self.set('status', 'draft');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -211,6 +211,9 @@ var EditorControllerMixin = Ember.Mixin.create(MarkerManager, {
|
||||
return model;
|
||||
}).catch(function (errors) {
|
||||
self.showErrorNotification(prevStatus, self.get('status'), errors);
|
||||
|
||||
self.set('status', prevStatus);
|
||||
|
||||
return Ember.RSVP.reject(errors);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user