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