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:
Smart-Codi 2022-04-29 14:40:22 -04:00 committed by GitHub
parent 7cfd892bb9
commit 36d45d9b98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -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,
}
)

View File

@ -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,
}