mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix: chart import error with virtual dataset (#19782)
* fix: chart import error with virtual dataset * remove unnecessary comment * resolve comment
This commit is contained in:
parent
7cfd892bb9
commit
36d45d9b98
@ -89,9 +89,7 @@ class ImportChartsCommand(ImportModelsCommand):
|
|||||||
config.update(
|
config.update(
|
||||||
{
|
{
|
||||||
"datasource_id": dataset.id,
|
"datasource_id": dataset.id,
|
||||||
"datasource_type": "view"
|
"datasource_type": "table",
|
||||||
if dataset.is_sqllab_view
|
|
||||||
else "table",
|
|
||||||
"datasource_name": dataset.table_name,
|
"datasource_name": dataset.table_name,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -138,7 +138,7 @@ class ImportExamplesCommand(ImportModelsCommand):
|
|||||||
|
|
||||||
dataset_info[str(dataset.uuid)] = {
|
dataset_info[str(dataset.uuid)] = {
|
||||||
"datasource_id": dataset.id,
|
"datasource_id": dataset.id,
|
||||||
"datasource_type": "view" if dataset.is_sqllab_view else "table",
|
"datasource_type": "table",
|
||||||
"datasource_name": dataset.table_name,
|
"datasource_name": dataset.table_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user