diff --git a/app/mixins/delete-model.js b/app/mixins/delete-model.js index 73f6ec5..9e113a0 100644 --- a/app/mixins/delete-model.js +++ b/app/mixins/delete-model.js @@ -8,7 +8,10 @@ export default Mixin.create({ actions: { delete: function() { this.get('model').destroyRecord().then(() => { - this.get('store').unloadAll(); + // Instead of unloading the entire store, we keep the loaded user models + ['species', 'strain', 'characteristic', 'measurement'].map((model) => { + this.get('store').unloadAll(model); + }); this.transitionToRoute(this.get('transitionRoute')); }); },