add columns for bootstrap_data (#20134)
This commit is contained in:
parent
77ccec50cc
commit
7a2eb8b602
|
|
@ -889,8 +889,11 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
|||
except (SupersetException, SQLAlchemyError):
|
||||
datasource_data = dummy_datasource_data
|
||||
|
||||
columns: List[Dict[str, Any]] = []
|
||||
if datasource:
|
||||
datasource_data["owners"] = datasource.owners_data
|
||||
if isinstance(datasource, Query):
|
||||
columns = datasource.extra.get("columns", [])
|
||||
|
||||
bootstrap_data = {
|
||||
"can_add": slice_add_perm,
|
||||
|
|
@ -905,6 +908,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
|||
"user": bootstrap_user_data(g.user, include_perms=True),
|
||||
"forced_height": request.args.get("height"),
|
||||
"common": common_bootstrap_payload(),
|
||||
"columns": columns,
|
||||
}
|
||||
if slc:
|
||||
title = slc.slice_name
|
||||
|
|
|
|||
Loading…
Reference in New Issue