bito-code-review[bot] commented on PR #43429:
URL: https://github.com/apache/superset/pull/43429#issuecomment-5382471005

   <!-- Bito Reply -->
   The flagged issue is correct. In 
`superset-frontend/src/dashboard/components/PropertiesModal/index.tsx`, the 
logic `if (jsonMetadataObj.async_mode === undefined)` prevents the modal from 
updating `jsonMetadataObj.async_mode` if it already exists in the metadata. 
This effectively locks the value to its initial state, preventing users from 
changing or clearing an existing override via the UI.
   
   To resolve this, you should remove the `if (jsonMetadataObj.async_mode === 
undefined)` check and allow the modal state to overwrite the metadata value, 
ensuring that 'default' correctly removes the key.
   
   Would you like me to implement this fix and check for other comments on this 
PR?
   
   **superset-frontend/src/dashboard/components/PropertiesModal/index.tsx**
   ```
   // Persist the per-dashboard async override (unless set directly in the
       // Advanced JSON editor). 'default' clears it so the deployment default 
applies.
       if (asyncMode === 'default') {
         delete jsonMetadataObj.async_mode;
       } else {
         jsonMetadataObj.async_mode = asyncMode;
       }
   ```


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