You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2022/07/27 01:19:09 UTC

[superset] branch master updated: fix: create property for schema_perm for `Query` (#20871)

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 35184b2994 fix: create property for schema_perm for `Query` (#20871)
35184b2994 is described below

commit 35184b299478edd44ee1c9d970f0d53ddc93ac86
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Tue Jul 26 21:18:59 2022 -0400

    fix: create property for schema_perm for `Query` (#20871)
    
    * create property for schema_perm
    
    * update references
---
 superset/models/sql_lab.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py
index 22f565032c..7eebceebd3 100644
--- a/superset/models/sql_lab.py
+++ b/superset/models/sql_lab.py
@@ -271,6 +271,10 @@ class Query(Model, ExtraJSONMixin, ExploreMixin):  # pylint: disable=abstract-me
     def dttm_cols(self) -> List[Any]:
         return [col.get("column_name") for col in self.columns if col.get("is_dttm")]
 
+    @property
+    def schema_perm(self) -> str:
+        return f"{self.database.database_name}.{self.schema}"
+
     @property
     def default_endpoint(self) -> str:
         return ""