Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
geido committed Nov 17, 2021
1 parent c2de7e2 commit 645ab4f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions superset/dashboards/dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 645ab4f

Please sign in to comment.