Permalink
Browse files

fix(Onboarding): Fix service import

Fixes #22
  • Loading branch information...
adlk committed Oct 22, 2017
1 parent 23174f9 commit 99d1c014efb273d25a5d73780c403427fb51a229
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/stores/UserStore.js
@@ -192,6 +192,15 @@ export default class UserStore extends Store {
@action async _importLegacyServices({ services }) {
this.isImportLegacyServicesExecuting = true;
// Reduces recipe duplicates
const recipes = services.filter((obj, pos, arr) => arr.map(mapObj => mapObj.recipe.id).indexOf(obj.recipe.id) === pos).map(s => s.recipe.id);
// Install recipes
for (const recipe of recipes) {
// eslint-disable-next-line
await this.stores.recipes._install({ recipeId: recipe });
}
for (const service of services) {
this.actions.service.createFromLegacyService({
data: service,

0 comments on commit 99d1c01

Please sign in to comment.