rusackas commented on code in PR #37625:
URL: https://github.com/apache/superset/pull/37625#discussion_r2760245859
##########
superset-frontend/src/features/reports/ReportModal/index.tsx:
##########
@@ -207,11 +207,11 @@ function ReportModal({
setCurrentReport({ isSubmitting: true, error: undefined });
try {
- if (isEditMode) {
+ if (isEditMode && currentReport.id) {
await dispatch(
editReport(currentReport.id, newReportValues as ReportObject),
);
- } else {
+ } else if (!isEditMode) {
Review Comment:
Fixed in 896b19737d. Changed the conditional to use `else` instead of `else
if (!isEditMode)` so that when isEditMode is true but currentReport.id is falsy
(edge case), we fall back to creating a new report instead of silently failing.
--
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]