Skip to content

Commit

Permalink
Fix incorrect datasource_name in dashboard export
Browse files Browse the repository at this point in the history
The bug was introduced in apache#7773

It uses filter by `cls.table_name == datasource_name`:
https://github.com/apache/incubator-superset/pull/7773/files#diff-a8dd5ec8d8decda2e3c5571d1ec0cdb6R740

But export puts `slc.datasource.name` into exported json:
https://github.com/apache/incubator-superset/pull/7773/files#diff-ceeb7eee8d573333109e0037299c9711L673

`slc.datasource.name` in case of `SqlaTable` is `"{}.{}".format(self.schema, self.table_name)`
  • Loading branch information
smacker committed Jul 18, 2019
1 parent 174a48a commit 66a83b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def export_dashboards(cls, dashboard_ids):
# add extra params for the import
copied_slc.alter_params(
remote_id=slc.id,
datasource_name=slc.datasource.name,
datasource_name=slc.datasource.datasource_name,
schema=slc.datasource.schema,
database_name=slc.datasource.database.name,
)
Expand Down

0 comments on commit 66a83b0

Please sign in to comment.