Kunal8954 commented on code in PR #44169:
URL: https://github.com/apache/superset/pull/44169#discussion_r4016931151


##########
superset/models/slice.py:
##########
@@ -190,8 +200,10 @@ def __repr__(self) -> str:
         return self.slice_name or str(self.id)
 
     @property
-    def datasource(self) -> SqlaTable | None:
-        return self.table
+    def datasource(self) -> SqlaTable | SemanticView | None:
+        if table := self.table:
+            return table
+        return self.semantic_view

Review Comment:
    I’ll keep the table-only authorization path type-pinned so a semantic-view 
ID cannot be treated as a table ID.



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