Skip to content

Commit

Permalink
Fixes walrus lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed May 23, 2023
1 parent d04f842 commit 022d554
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions superset/migrations/shared/migrate_viz/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@ class MigratePivotTable(MigrateViz):
}

def _pre_action(self) -> None:
pivot_margins = self.data.get("pivot_margins")
if pivot_margins:
if pivot_margins := self.data.get("pivot_margins"):
self.data["colTotals"] = pivot_margins
self.data["rowTotals"] = pivot_margins

pandas_aggfunc = self.data.get("pandas_aggfunc")
if pandas_aggfunc:
if pandas_aggfunc := self.data.get("pandas_aggfunc"):
self.data["pandas_aggfunc"] = self.aggregation_mapping[pandas_aggfunc]

0 comments on commit 022d554

Please sign in to comment.