This is an automated email from the ASF dual-hosted git repository. suddjian pushed a commit to branch dashboard-bootstrap in repository https://gitbox.apache.org/repos/asf/superset.git
commit 2ef5532949efc75465a0f32258d93147ad795997 Author: David Aaron Suddjian <[email protected]> AuthorDate: Tue Feb 2 15:24:21 2021 -0800 attempted fixes --- superset/dashboards/api.py | 5 +++-- superset/dashboards/dao.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py index 6366688..d6a9fa0 100644 --- a/superset/dashboards/api.py +++ b/superset/dashboards/api.py @@ -210,7 +210,7 @@ class DashboardRestApi(BaseSupersetModelRestApi): self.include_route_methods = self.include_route_methods | {"thumbnail"} super().__init__() - @expose("/<pk>/charts/", methods=["GET"]) + @expose("/<pk>/charts", methods=["GET"]) @protect() @safe @statsd_metrics @@ -254,7 +254,8 @@ class DashboardRestApi(BaseSupersetModelRestApi): 500: $ref: '#/components/responses/500' """ - DashboardDAO.get_charts_for_dashboard(pk) + charts = DashboardDAO.get_charts_for_dashboard(pk) + return self.response(200, id=pk, response=charts) @expose("/", methods=["POST"]) @protect() diff --git a/superset/dashboards/dao.py b/superset/dashboards/dao.py index aae75c8..810cb94 100644 --- a/superset/dashboards/dao.py +++ b/superset/dashboards/dao.py @@ -23,7 +23,6 @@ from sqlalchemy.exc import SQLAlchemyError from superset.dao.base import BaseDAO from superset.dashboards.filters import DashboardFilter from superset.extensions import db -from superset.models.slice import Slice from superset.models.core import FavStar, FavStarClassName from superset.models.dashboard import Dashboard from superset.models.slice import Slice @@ -39,7 +38,9 @@ class DashboardDAO(BaseDAO): @staticmethod def get_charts_for_dashboard(dashboard_id: int) -> List[Slice]: query = db.session.query(Dashboard).filter(Dashboard.id == dashboard_id) + logger.info("GETTING CHARTS____") logger.info(query.__dict__) + return [] @staticmethod def validate_slug_uniqueness(slug: str) -> bool:
