innovark37 commented on code in PR #40885:
URL: https://github.com/apache/superset/pull/40885#discussion_r3571207887
##########
superset/commands/report/execute.py:
##########
@@ -897,6 +934,13 @@ def _get_notification_content(self) ->
NotificationContent: # noqa: C901
csv_data = self._get_csv_data()
if not csv_data:
error_text = "Unexpected missing csv file"
+ elif (
+ self._report_schedule.chart
+ and self._report_schedule.report_format ==
ReportDataFormat.XLSX
+ ):
+ xlsx_data = self._get_xlsx_data()
+ if not xlsx_data:
+ error_text = "Unexpected missing xlsx file"
Review Comment:
Good catch.
XLSX is only supported for chart-backed schedules, so I added an explicit
server-side guard for unsupported targets. A dashboard schedule configured with
XLSX now raises `ReportScheduleXlsxFailedError` instead of falling through and
sending a successful notification without an attachment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]