From 05100ed1619844407bb77eba101d396e8e7ad3ad Mon Sep 17 00:00:00 2001 From: smileydev <47900232+prosdev0107@users.noreply.github.com> Date: Thu, 21 Apr 2022 16:59:01 -0400 Subject: [PATCH] =?UTF-8?q?fix(dashboard):=20make=20to=20filter=20the=20co?= =?UTF-8?q?rrect=20certified=20or=20non-certified=E2=80=A6=20(#19429)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(dashboard): make to filter the correct certified or non-certified dashboards * fix(dashboard): make to fix python lint issue --- 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 3bbef14f4cb0..7b02c2367954 100644 --- a/superset/dashboards/filters.py +++ b/superset/dashboards/filters.py @@ -224,12 +224,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