diff --git a/superset/utils/migrate_viz.py b/superset/utils/migrate_viz.py index d505fb5fe7d70..6e59f1257fcbb 100644 --- a/superset/utils/migrate_viz.py +++ b/superset/utils/migrate_viz.py @@ -121,11 +121,11 @@ def _pre_action(self) -> None: self.data["contributionMode"] = "row" stacked = self.data.get("stacked_style") - stacked_map = { - "expand": "Expand", - "stack": "Stack", - } if stacked: + stacked_map = { + "expand": "Expand", + "stack": "Stack", + } self.data["show_extra_controls"] = True self.data["stack"] = stacked_map.get(stacked)