0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Merge pull request #4771 from ErisDS/importer-store-reset

Reset the store after import
This commit is contained in:
Jason Williams 2015-01-08 09:36:20 -06:00
commit 8a99a934d3

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) {