From 64290465e77db880e75be21b40b63359e57ec518 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Wed, 21 Feb 2018 19:44:23 +0100
Subject: [PATCH] Fixed source not passed from query in import route

---
 front/src/components/library/import/Main.vue | 2 +-
 front/src/router/index.js                    | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/front/src/components/library/import/Main.vue b/front/src/components/library/import/Main.vue
index 66ba8c66..75017c1e 100644
--- a/front/src/components/library/import/Main.vue
+++ b/front/src/components/library/import/Main.vue
@@ -150,7 +150,7 @@ export default {
       currentType: this.mbType || 'artist',
       currentId: this.mbId,
       currentStep: 0,
-      currentSource: '',
+      currentSource: this.source,
       metadata: {},
       isImporting: false,
       importData: {
diff --git a/front/src/router/index.js b/front/src/router/index.js
index 971ef05c..bf59b8ee 100644
--- a/front/src/router/index.js
+++ b/front/src/router/index.js
@@ -98,7 +98,10 @@ export default new Router({
           path: 'import/launch',
           name: 'library.import.launch',
           component: LibraryImport,
-          props: (route) => ({ mbType: route.query.type, mbId: route.query.id })
+          props: (route) => ({
+            source: route.query.source,
+            mbType: route.query.type,
+            mbId: route.query.id })
         },
         {
           path: 'import/batches',
-- 
GitLab