Skip to content

Commit

Permalink
review comments fix
Browse files Browse the repository at this point in the history
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
  • Loading branch information
sinhashubham95 and villebro committed Nov 21, 2022
1 parent 0a60bc6 commit 8ec8622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/connectors/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ def data_for_slices( # pylint: disable=too-many-locals
metric_names.add(utils.get_metric_name(metric))
if utils.is_adhoc_metric(metric):
column = metric.get("column") or {}
if hasattr(column, "get") and "column_name" in column:
column_names.add(column.get("column_name"))
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 8ec8622

Please sign in to comment.