You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2022/04/29 18:40:31 UTC
[superset] branch master updated: fix: chart import error with virtual dataset (#19782)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 36d45d9b98 fix: chart import error with virtual dataset (#19782)
36d45d9b98 is described below
commit 36d45d9b98d57493ad9a29efb6a349902383897a
Author: Smart-Codi <co...@gmail.com>
AuthorDate: Fri Apr 29 14:40:22 2022 -0400
fix: chart import error with virtual dataset (#19782)
* fix: chart import error with virtual dataset
* remove unnecessary comment
* resolve comment
---
superset/charts/commands/importers/v1/__init__.py | 4 +---
superset/commands/importers/v1/examples.py | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/superset/charts/commands/importers/v1/__init__.py b/superset/charts/commands/importers/v1/__init__.py
index f407a4662c..ab88038aaa 100644
--- a/superset/charts/commands/importers/v1/__init__.py
+++ b/superset/charts/commands/importers/v1/__init__.py
@@ -89,9 +89,7 @@ class ImportChartsCommand(ImportModelsCommand):
config.update(
{
"datasource_id": dataset.id,
- "datasource_type": "view"
- if dataset.is_sqllab_view
- else "table",
+ "datasource_type": "table",
"datasource_name": dataset.table_name,
}
)
diff --git a/superset/commands/importers/v1/examples.py b/superset/commands/importers/v1/examples.py
index 43d7e7e1fa..679b9c441b 100644
--- a/superset/commands/importers/v1/examples.py
+++ b/superset/commands/importers/v1/examples.py
@@ -138,7 +138,7 @@ class ImportExamplesCommand(ImportModelsCommand):
dataset_info[str(dataset.uuid)] = {
"datasource_id": dataset.id,
- "datasource_type": "view" if dataset.is_sqllab_view else "table",
+ "datasource_type": "table",
"datasource_name": dataset.table_name,
}