metabase-exporter 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metabase-exporter",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "bin": {
5
5
  "metabase-exporter": "./src/index.js"
6
6
  },
@@ -291,7 +291,10 @@ class MetabaseService {
291
291
  else {
292
292
  destinationCard = await targetInstance.getCard(newCardId);
293
293
  destinationCard.dashboard_id = createdDashboard.id;
294
- await targetInstance.updateCard(newCardId, destinationCard);
294
+
295
+ const srcCard = await this.getCard(srcDashcard.card_id);
296
+
297
+ if(srcCard && srcCard.dashboard_id) await targetInstance.updateCard(newCardId, destinationCard);
295
298
  }
296
299
  const dashCardPaylod = {
297
300
  id: tempid--,