rusackas commented on code in PR #40955:
URL: https://github.com/apache/superset/pull/40955#discussion_r3557661273


##########
superset/commands/chart/exceptions.py:
##########
@@ -103,6 +103,19 @@ def __init__(self) -> None:
         )
 
 
+class ChartQueryContextDatasourceMismatchValidationError(ValidationError):
+    """
+    Raised when a query-context-only update carries a datasource that does not
+    match the chart's own datasource.
+    """
+
+    def __init__(self) -> None:
+        super().__init__(
+            _("The query context datasource does not match the chart 
datasource"),
+            field_name="query_context",
+        )

Review Comment:
   Those cases are already covered in `update_test.py` — 
`test_update_chart_query_context_mismatched_datasource_is_rejected` 
parametrizes id, type, and missing-type mismatches, and 
`..._without_datasource_is_allowed` covers the bypass path.



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