Skip to content

Commit

Permalink
fix: Unhandled exception Str Column Type (#22147)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhashubham95 committed Nov 21, 2022
1 parent 9a2cb43 commit cc38400
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset/connectors/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ def data_for_slices( # pylint: disable=too-many-locals
for metric in utils.get_iterable(form_data.get(metric_param) or []):
metric_names.add(utils.get_metric_name(metric))
if utils.is_adhoc_metric(metric):
column_names.add(
(metric.get("column") or {}).get("column_name")
)
column = metric.get("column") or {}
if column_name := column.get("column_name"):
column_names.add(column_name)

# Columns used in query filters
column_names.update(
Expand Down

0 comments on commit cc38400

Please sign in to comment.