mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[cache] Cleaning up viz/cache logic (#9375)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
@@ -80,12 +80,11 @@ def get_permissions(user):
|
||||
|
||||
|
||||
def get_viz(
|
||||
slice_id=None, form_data=None, datasource_type=None, datasource_id=None, force=False
|
||||
form_data: Dict[str, Any],
|
||||
datasource_type: str,
|
||||
datasource_id: int,
|
||||
force: bool = False,
|
||||
):
|
||||
if slice_id:
|
||||
slc = db.session.query(Slice).filter_by(id=slice_id).one()
|
||||
return slc.get_viz()
|
||||
|
||||
viz_type = form_data.get("viz_type", "table")
|
||||
datasource = ConnectorRegistry.get_datasource(
|
||||
datasource_type, datasource_id, db.session
|
||||
|
||||
Reference in New Issue
Block a user