diff --git a/frontend/src/metabase/selectors/data.ts b/frontend/src/metabase/selectors/data.ts index 6948ea6cc3e27d10285b6e96801644e0cc680b1c..4cf666f183b9bb4d999a893871c2b0ac84c3cbe0 100644 --- a/frontend/src/metabase/selectors/data.ts +++ b/frontend/src/metabase/selectors/data.ts @@ -7,19 +7,19 @@ const getDatabaseList = createSelector( databases => (databases ? Object.values(databases) : []), ); -export const getHasDataAccess = createSelector([getDatabaseList], databases => +export const getHasDataAccess = createSelector(getDatabaseList, databases => databases.some(d => !d.is_saved_questions), ); -export const getHasOwnDatabase = createSelector([getDatabaseList], databases => +export const getHasOwnDatabase = createSelector(getDatabaseList, databases => databases.some(d => !d.is_sample && !d.is_saved_questions), ); -export const getHasNativeWrite = createSelector([getDatabaseList], databases => +export const getHasNativeWrite = createSelector(getDatabaseList, databases => databases.some(d => d.native_permissions === "write"), ); export const getHasDatabaseWithJsonEngine = createSelector( - [getDatabaseList], + getDatabaseList, databases => databases.some(d => getEngineNativeType(d.engine) === "json"), );