mikebridge commented on code in PR #43885:
URL: https://github.com/apache/superset/pull/43885#discussion_r4050464268


##########
superset/models/slice.py:
##########
@@ -442,7 +442,26 @@ def set_related_perm(_mapper: Mapper, _connection: 
Connection, target: Slice) ->
     # pylint: disable=import-outside-toplevel
     from superset.daos.datasource import DatasourceDAO
 
-    src_class = DatasourceDAO.sources[target.datasource_type]
+    src_class = DatasourceDAO.sources.get(target.datasource_type)

Review Comment:
   Addressed in 
https://github.com/apache/superset/commit/a631f673cf2a930e8f9819e848822a40ed18f1f0
 — an explicit null datasource_type is rejected by UpdateChartCommand before 
DAO update or commit, using the existing 422 validation response. The 
schema-to-command regression covers both table and semantic-view charts and 
verifies their datasource and permission fields remain unchanged. Current 
master is merged, preserving #44416’s semantic-view validation and 
explicit-null datasource_id checks. Also clarified that clearing derived 
permissions does not revoke independent owner/Admin/viewer chart grants. All 78 
affected tests and scoped hooks (including MyPy and Pylint) pass; new-head CI 
is pending. Thanks.



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