Skip to content

Commit

Permalink
add columns for bootstrap_data (#20134)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh authored May 26, 2022
1 parent 77ccec5 commit 7a2eb8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,11 @@ def explore(
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,
Expand All @@ -905,6 +908,7 @@ def explore(
"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
Expand Down

0 comments on commit 7a2eb8b

Please sign in to comment.