Skip to content
Snippets Groups Projects
Unverified Commit 8ed99737 authored by Gustavo Saiani's avatar Gustavo Saiani Committed by GitHub
Browse files

Show "Learn about your data" info on fresh model page (#25817)

parent 32a87c73
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ import { getDatasetTable } from "./nested-card-query-table";
export function getNativeQueryTable(nativeQuery: NativeQuery): Table | null {
const question = nativeQuery.question();
const isDataset = question?.isDataset();
const isDataset = question?.isDataset() && question.isSaved();
if (isDataset) {
return getDatasetTable(nativeQuery);
......
......@@ -20,15 +20,15 @@ export function getStructuredQueryTable(query: StructuredQuery): Table | null {
return getNestedCardTable(query);
}
// 3. The query's question is a dataset.
// 3. The query's question is a saved dataset.
const question = query.question();
const isDataset = question?.isDataset() ?? false;
const isDataset = question?.isDataset() && question.isSaved();
if (isDataset) {
return getDatasetTable(query);
}
// 4. The query's table is a concrete table, assuming one exists in `metadata`.
// Faiure to find a table at this point indicates that there is a bug.
// Failure to find a table at this point indicates that there is a bug.
return query.metadata().table(sourceTableId);
}
......
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