Vitor-Avila commented on code in PR #44992:
URL: https://github.com/apache/superset/pull/44992#discussion_r4224422238
##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -985,10 +1072,63 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
extra: contentType === ContentType.Dashboard ? currentAlert?.extra : {},
};
+ if (!isReport && !attachmentControlsVisible && !isEditMode) {
+ data.report_format = 'NONE';
+ }
+ if (!attachmentControlsVisible && isEditMode) {
+ // Hidden settings stay stored; only the format controls attachment
delivery.
+ delete data.chart;
+ delete data.dashboard;
+ delete data.extra;
+ delete data.custom_width;
+ delete data.force_screenshot;
+ }
+
if (data.recipients && !data.recipients.length) {
delete data.recipients;
}
+ // Preserve existing identities unless an admin chooses or the user takes
over.
+ delete data.run_as;
+ delete data.run_alert_query_as;
+ delete data.run_as_type;
+ delete data.run_alert_query_as_type;
+ if (dynamicExecutorEnabled && isAdmin) {
+ data.run_as_type = currentAlert?.run_as_type ?? null;
Review Comment:
I'd say this is expected: most other flows in Superset are like that (`PUT`
including all payload). Also, the error will flag to the admin right away this
schedule needs fixing.
--
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]