Skip to content

Commit

Permalink
fix: chart import error with virtual dataset (apache#19782)
Browse files Browse the repository at this point in the history
* fix: chart import error with virtual dataset

* remove unnecessary comment

* resolve comment
  • Loading branch information
codemaster08240328 authored May 11, 2022
1 parent 42a544b commit 8ecaf69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions superset/charts/commands/importers/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ def _import(
config.update(
{
"datasource_id": dataset.id,
"datasource_type": "view"
if dataset.is_sqllab_view
else "table",
"datasource_type": "table",
"datasource_name": dataset.table_name,
}
)
Expand Down
2 changes: 1 addition & 1 deletion superset/commands/importers/v1/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _import( # pylint: disable=arguments-differ, too-many-locals, too-many-bran

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

Expand Down

0 comments on commit 8ecaf69

Please sign in to comment.