From 7860818a2fbd08dcb20596ed89712a7cc0613c25 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 8 Jan 2015 13:42:45 +0000 Subject: [PATCH] Reset the store after import no issue - without this, the content screen doesn't update properly after an import --- core/client/controllers/settings/labs.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/client/controllers/settings/labs.js b/core/client/controllers/settings/labs.js index f3c7e8023c..fcbfc48264 100644 --- a/core/client/controllers/settings/labs.js +++ b/core/client/controllers/settings/labs.js @@ -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) {