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-unsubscr...@superset.apache.org

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



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

Reply via email to