Copilot commented on code in PR #43026:
URL: https://github.com/apache/superset/pull/43026#discussion_r3754059937


##########
superset-frontend/src/components/Datasource/DatasourceModal/index.tsx:
##########
@@ -147,7 +147,7 @@ const DatasourceModal: 
FunctionComponent<DatasourceModalProps> = ({
             d3format: metric.d3format || null,
             currency: metric.currency,
             verbose_name: metric.verbose_name,
-            warning_text: metric.warning_text,
+            warning_text: metric.warning_markdown,

Review Comment:
   `warning_text` is being set solely from `metric.warning_markdown`. In 
`DatasourceEditor`, `warning_markdown` is normalized to `''` when missing 
(parsed from `metric.extra`), so saving a dataset can unintentionally overwrite 
an existing non-empty `warning_text` with an empty string for metrics that 
don’t have `warning_markdown` set. This risks silently wiping warnings that are 
still stored in `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