From fe92e32ba47e98cf940b0baceffe49ca4a9e3b2b Mon Sep 17 00:00:00 2001 From: Taylor Date: Wed, 30 Mar 2022 05:37:56 -0400 Subject: [PATCH] fix(dashboard): make to filter the correct certified or non-certified dashboards --- superset/dashboards/filters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset/dashboards/filters.py b/superset/dashboards/filters.py index 5f79392e71ecd..6b89c5b680f14 100644 --- a/superset/dashboards/filters.py +++ b/superset/dashboards/filters.py @@ -189,12 +189,14 @@ def apply(self, query: Query, value: Any) -> Query: return query.filter( and_( Dashboard.certified_by.isnot(None), + Dashboard.certified_by != '', ) ) if value is False: return query.filter( - and_( + or_( Dashboard.certified_by.is_(None), + Dashboard.certified_by == '', ) ) return query