0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Reset the store after import

no issue

- without this, the content screen doesn't update properly after an import
This commit is contained in:
Hannah Wolfe 2015-01-08 13:42:45 +00:00
parent 04180bc83b
commit 7860818a2f

View file

@ -53,6 +53,13 @@ var LabsController = Ember.Controller.extend(Ember.Evented, {
contentType: false,
processData: false
}).then(function () {
// Clear the store, so that all the new data gets fetched correctly.
self.store.unloadAll('post');
self.store.unloadAll('tag');
self.store.unloadAll('user');
self.store.unloadAll('role');
self.store.unloadAll('setting');
self.store.unloadAll('notification');
self.notifications.showSuccess('Import successful.');
}).catch(function (response) {
if (response && response.jqXHR && response.jqXHR.responseJSON && response.jqXHR.responseJSON.errors) {