Merge pull request #3785 from jaswilli/post-status

Revert post status on failed save.
This commit is contained in:
Hannah Wolfe 2014-08-15 18:27:47 +01:00
commit 8edbaa9ae0
2 changed files with 3 additions and 3 deletions

View File

@ -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');
});
}
}

View File

@ -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);
});
},