Skip to content

Commit

Permalink
fix: pivot columns with ints for name (#16259)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9b2dffe)
  • Loading branch information
betodealmeida authored and villebro committed Aug 16, 2021
1 parent 6599262 commit 3bfb4d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion superset/charts/post_processing.py
Expand Up @@ -177,7 +177,7 @@ def pivot_table_v2( # pylint: disable=too-many-branches
df = df.stack(0).unstack().reindex(level=-1, columns=metrics)

# flatten column names
df.columns = [" ".join(column) for column in df.columns]
df.columns = [" ".join(str(name) for name in column) for column in df.columns]

return df

Expand Down
3 changes: 3 additions & 0 deletions superset/reports/commands/execute.py
Expand Up @@ -182,6 +182,7 @@ def _get_screenshot(self) -> bytes:
screenshot: Optional[BaseScreenshot] = None
if self._report_schedule.chart:
url = self._get_url(standalone="true")
logger.info("Screenshotting chart at %s", url)
screenshot = ChartScreenshot(
url,
self._report_schedule.chart.digest,
Expand All @@ -190,6 +191,7 @@ def _get_screenshot(self) -> bytes:
)
else:
url = self._get_url()
logger.info("Screenshotting dashboard at %s", url)
screenshot = DashboardScreenshot(
url,
self._report_schedule.dashboard.digest,
Expand Down Expand Up @@ -235,6 +237,7 @@ def _get_csv_data(self) -> bytes:
) from ex

try:
logger.info("Getting chart from %s", url)
csv_data = get_chart_csv_data(url, auth_cookies)
except SoftTimeLimitExceeded:
raise ReportScheduleCsvTimeout()
Expand Down

0 comments on commit 3bfb4d6

Please sign in to comment.