From c56972acd6ddfa5eff3d3bef60acd770effb4a23 Mon Sep 17 00:00:00 2001 From: Diego Medina Date: Thu, 7 Jul 2022 09:18:00 -0300 Subject: [PATCH] fix: Published Dashboard without charts don't show up for non admin users --- superset/dashboards/filters.py | 2 +- superset/sql_parse.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/superset/dashboards/filters.py b/superset/dashboards/filters.py index f765bc8ffd5f9..8b4b8fe5269de 100644 --- a/superset/dashboards/filters.py +++ b/superset/dashboards/filters.py @@ -111,7 +111,7 @@ def apply(self, query: Query, value: Any) -> Query: datasource_perm_query = ( db.session.query(Dashboard.id) - .join(Dashboard.slices) + .join(Dashboard.slices, isouter=True) .filter( and_( Dashboard.published.is_(True), diff --git a/superset/sql_parse.py b/superset/sql_parse.py index d377986f56573..ab2f04417249c 100644 --- a/superset/sql_parse.py +++ b/superset/sql_parse.py @@ -494,7 +494,7 @@ class InsertRLSState(str, Enum): def has_table_query(token_list: TokenList) -> bool: """ - Return if a stament has a query reading from a table. + Return if a statement has a query reading from a table. >>> has_table_query(sqlparse.parse("COUNT(*)")[0]) False