You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/12/20 11:08:03 UTC

[GitHub] [superset] dpgaspar commented on a diff in pull request #22358: fix: dashboard get by id or slug access filter

dpgaspar commented on code in PR #22358:
URL: https://github.com/apache/superset/pull/22358#discussion_r1053195502


##########
superset/dashboards/dao.py:
##########
@@ -40,11 +40,22 @@ class DashboardDAO(BaseDAO):
     base_filter = DashboardAccessFilter
 
     @staticmethod
-    def get_by_id_or_slug(id_or_slug: str) -> Dashboard:
-        dashboard = Dashboard.get(id_or_slug)

Review Comment:
   it does but the get item endpoint for dashboards is custom on Superset because we need to fetch a dashboard by `id` or `slug`, so on this case we need to custom develop. FAB `ModelRestApi` on get item endpoints will get item by the table primary key



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org