endimonan commented on code in PR #43365:
URL: https://github.com/apache/superset/pull/43365#discussion_r3861619404


##########
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:
   I plan to add report_format to list_columns, so the existing format reaches 
the modal and is preserved on save without an additional request.
   
   If you’d prefer the full schedule fetch instead, I’m happy to rework it.



-- 
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]

Reply via email to