diff --git a/frontend/src/metabase/admin/permissions/selectors.js b/frontend/src/metabase/admin/permissions/selectors.js index e4b5dacdbfb06ae2ae73472c94a43f8d29d275cf..34ea0a42622dc8fbafe5df0632830b58d091652d 100644 --- a/frontend/src/metabase/admin/permissions/selectors.js +++ b/frontend/src/metabase/admin/permissions/selectors.js @@ -1,5 +1,4 @@ import { createSelector } from "reselect"; - import { push } from "react-router-redux"; import TogglePropagateAction from "./containers/TogglePropagateAction"; @@ -322,12 +321,17 @@ export const getTablesPermissionsGrid = createSelector( schemaName: SchemaName, ) => { const database = metadata.database(databaseId); - if (!groups || !permissions || !database) { return null; } - const tables = database.schema(schemaName).tables; + const schema = database.schema(schemaName); + const tables = schema && schema.tables; + + if (_.isEmpty(tables)) { + return null; + } + const defaultGroup = _.find(groups, isDefaultGroup); return {