mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
Refactor Dashboard and Slice models (#8820)
* refactor dashboard and slice models * appease various linters * remove shortcuts & import indirection * appease mypy * fix bad imports * lint * address various issues * ignore type issue * remove unused imports * lint
This commit is contained in:
committed by
Maxime Beauchemin
parent
cbf860074b
commit
016f202423
@@ -19,8 +19,10 @@ import json
|
||||
import textwrap
|
||||
|
||||
from superset import db
|
||||
from superset.models.dashboard import Dashboard
|
||||
from superset.models.slice import Slice
|
||||
|
||||
from .helpers import Dash, Slice, update_slice_ids
|
||||
from .helpers import update_slice_ids
|
||||
|
||||
|
||||
def load_tabbed_dashboard(_=False):
|
||||
@@ -28,10 +30,10 @@ def load_tabbed_dashboard(_=False):
|
||||
|
||||
print("Creating a dashboard with nested tabs")
|
||||
slug = "tabbed_dash"
|
||||
dash = db.session.query(Dash).filter_by(slug=slug).first()
|
||||
dash = db.session.query(Dashboard).filter_by(slug=slug).first()
|
||||
|
||||
if not dash:
|
||||
dash = Dash()
|
||||
dash = Dashboard()
|
||||
|
||||
# reuse charts in "World's Bank Data and create
|
||||
# new dashboard with nested tabs
|
||||
|
||||
Reference in New Issue
Block a user