chore: Cleaning up ENABLE_REACT_CRUD_VIEWS config (#11496)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2020-10-29 16:47:11 -07:00
committed by GitHub
parent 93693690a3
commit a8eb3fe8e7
9 changed files with 22 additions and 27 deletions

View File

@@ -21,7 +21,7 @@ from flask_appbuilder.models.sqla.interface import SQLAInterface
from flask_appbuilder.security.decorators import has_access, has_access_api
from flask_babel import lazy_gettext as _
from superset import app, db
from superset import db, is_feature_enabled
from superset.constants import RouteMethod
from superset.models.sql_lab import Query, SavedQuery, TableSchema, TabState
from superset.typing import FlaskResponse
@@ -78,7 +78,7 @@ class SavedQueryView(
@expose("/list/")
@has_access
def list(self) -> FlaskResponse:
if not app.config["ENABLE_REACT_CRUD_VIEWS"]:
if not is_feature_enabled("ENABLE_REACT_CRUD_VIEWS"):
return super().list()
return super().render_app_template()