mirror of
https://github.com/apache/superset.git
synced 2026-04-25 19:14:27 +00:00
feat!: pass datasource_type and datasource_id to form_data (#19981)
* pass datasource_type and datasource_id to form_data * add datasource_type to delete command * add datasource_type to delete command * fix old keys implementation * add more tests
This commit is contained in:
committed by
GitHub
parent
a813528958
commit
32bb1ce3ff
@@ -24,6 +24,7 @@ from superset.models.core import Database
|
||||
from superset.models.dashboard import Dashboard
|
||||
from superset.models.slice import Slice
|
||||
from superset.models.sql_lab import TabState
|
||||
from superset.utils.core import DatasourceType
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -75,7 +76,8 @@ class DatabaseDAO(BaseDAO):
|
||||
charts = (
|
||||
db.session.query(Slice)
|
||||
.filter(
|
||||
Slice.datasource_id.in_(dataset_ids), Slice.datasource_type == "table"
|
||||
Slice.datasource_id.in_(dataset_ids),
|
||||
Slice.datasource_type == DatasourceType.TABLE,
|
||||
)
|
||||
.all()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user