From 6d89ffbcb7533dc04093a66852aab26db0b5bc11 Mon Sep 17 00:00:00 2001 From: smileydev <47900232+prosdev0107@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:10:21 -0400 Subject: [PATCH] fix(dashboard): make to show the correct owned objects (#19372) * fix(dashboard): make to show the correct owned objects * fix(dashboard): make to filter is reusable * fix(homepage): make sure the type Array * fix(homepage): make to display dashboard correctly by owners --- superset-frontend/src/views/CRUD/utils.tsx | 4 ++-- superset-frontend/src/views/CRUD/welcome/Welcome.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx index 6606fd459f874..3449d764abfa2 100644 --- a/superset-frontend/src/views/CRUD/utils.tsx +++ b/superset-frontend/src/views/CRUD/utils.tsx @@ -166,8 +166,8 @@ export const getUserOwnedObjects = ( resource: string, filters: Array = [ { - col: 'created_by', - opr: 'rel_o_m', + col: 'owners', + opr: 'rel_m_m', value: `${userId}`, }, ], diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx index a1f7707a23541..056e02e8f6226 100644 --- a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx +++ b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx @@ -204,8 +204,8 @@ function Welcome({ user, addDangerToast }: WelcomeProps) { // Sets other activity data in parallel with recents api call const ownSavedQueryFilters = [ { - col: 'owners', - opr: 'rel_m_m', + col: 'created_by', + opr: 'rel_o_m', value: `${id}`, }, ];