From 645ab4f3ba8736131a0947eb2bba91594c857673 Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 17 Nov 2021 15:19:17 +0000 Subject: [PATCH] Format --- superset/dashboards/dao.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/superset/dashboards/dao.py b/superset/dashboards/dao.py index fd6d636250bf5..0a15365598df3 100644 --- a/superset/dashboards/dao.py +++ b/superset/dashboards/dao.py @@ -130,8 +130,7 @@ def get_dashboard_and_datasets_changed_on( # pylint: disable=invalid-name def validate_slug_uniqueness(slug: str) -> bool: if not slug: return True - dashboard_query = db.session.query( - Dashboard).filter(Dashboard.slug == slug) + dashboard_query = db.session.query(Dashboard).filter(Dashboard.slug == slug) return not db.session.query(dashboard_query.exists()).scalar() @staticmethod @@ -188,8 +187,7 @@ def set_dash_metadata( ] session = db.session() - current_slices = session.query(Slice).filter( - Slice.id.in_(slice_ids)).all() + current_slices = session.query(Slice).filter(Slice.id.in_(slice_ids)).all() dashboard.slices = current_slices