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/03/17 03:18:23 UTC

[GitHub] [superset] diegomedina248 commented on a change in pull request #19223: fix(dashboard): make to show the correct owned objects

diegomedina248 commented on a change in pull request #19223:
URL: https://github.com/apache/superset/pull/19223#discussion_r828719925



##########
File path: superset-frontend/src/views/CRUD/utils.tsx
##########
@@ -167,8 +167,8 @@ export const getUserOwnedObjects = (
   const filters = {
     created: [
       {
-        col: 'created_by',
-        opr: 'rel_o_m',
+        col: resource === 'saved_query' ? 'created_by' : 'owners',

Review comment:
       this kind of defeats the purpose to me, and makes this function harder to reuse.
   I would add a `col` and `opr` as third and fourth param, assigning the 'owners' and 'rel_m_m' as defaults.
   Then, when calling for `saved_query`, we can override those, and reuse it for other calls if needed.




-- 
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