endimonan commented on code in PR #43365:
URL: https://github.com/apache/superset/pull/43365#discussion_r3829837374
##########
superset-frontend/src/features/reports/ReportModal/reducer.ts:
##########
@@ -52,14 +52,10 @@ export default function reportsReducer(
[SET_REPORT]() {
const { report, resourceId, creationMethod, filterField } =
action as SetReportAction;
- // Map filterField ('dashboard_id' or 'chart_id') to the corresponding
- // ReportObject property ('dashboard' or 'chart')
- const propertyName =
- filterField === 'dashboard_id' ? 'dashboard' : 'chart';
// For now report count should only be one, but we are checking in case
// functionality changes.
const reportObject = report.result?.find(
- (r: ReportObject) => r[propertyName] === resourceId,
+ (r: ReportObject) => r[filterField] === resourceId,
Review Comment:
Hello @sadpandajoe...
Seems that my PR makes that behaviour reachable again, so an XLSX report can
be rewritten. The gap itself predates the regression (I mentioned in the PR
body).
Do you think this should be fixed in this PR or a follow up PR ?
Thanks for reviewing :D
--
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]