Skip to content

Commit

Permalink
Reset the store after import
Browse files Browse the repository at this point in the history
no issue

- without this, the content screen doesn't update properly after an import
  • Loading branch information
ErisDS committed Jan 8, 2015
1 parent 04180bc commit 7860818
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/client/controllers/settings/labs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7860818

Please sign in to comment.