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

   <!-- Bito Reply -->
   The concern regarding `warning_text` being overwritten by an empty string is 
valid. In the provided diff, the `DatasourceModal` component is updated to map 
`warning_text` directly from `metric.warning_markdown`:
   
   ```tsx
   -            warning_text: metric.warning_text,
   +            warning_text: metric.warning_markdown,
   ```
   
   If `metric.warning_markdown` is normalized to an empty string when missing, 
this change will indeed overwrite any existing `warning_text` value with that 
empty string during a save operation. To prevent this, you should ensure that 
the existing `warning_text` is preserved if `warning_markdown` is empty, for 
example by using `metric.warning_markdown || metric.warning_text`.
   
   **superset-frontend/src/components/Datasource/DatasourceModal/index.tsx**
   ```
   warning_text: metric.warning_markdown || metric.warning_text,
   ```


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