Skip to content
Snippets Groups Projects
Unverified Commit 05765885 authored by Paul Rosenzweig's avatar Paul Rosenzweig Committed by GitHub
Browse files

only show queryable tables when there are multiple schemas (#10757)

parent d32039ac
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,7 @@ export const separateTablesBySchema = ( ...@@ -73,6 +73,7 @@ export const separateTablesBySchema = (
? 0 ? 0
: -1, : -1,
) )
.filter(isQueryable)
.map((table, index, sortedTables) => { .map((table, index, sortedTables) => {
if (!table || !table.id || !table.name) { if (!table || !table.id || !table.name) {
return; return;
......
import { separateTablesBySchema } from "metabase/reference/databases/TableList";
describe("separateTablesBySchema", () => {
it("should filter out hidden tables", () => {
const tables = { 1: {}, 2: { visibility_type: "hidden" } };
expect(separateTablesBySchema(tables).length).toBe(1);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment