mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(saved query): handle null sql field (#11679)
This commit is contained in:
@@ -162,7 +162,7 @@ const SavedQueryPreviewModal: FunctionComponent<SavedQueryPreviewModalProps> = (
|
||||
<QueryTitle>query name</QueryTitle>
|
||||
<QueryLabel>{savedQuery.label}</QueryLabel>
|
||||
<SyntaxHighlighter language="sql" style={github}>
|
||||
{savedQuery.sql}
|
||||
{savedQuery.sql || ''}
|
||||
</SyntaxHighlighter>
|
||||
</StyledModal>
|
||||
</div>
|
||||
|
||||
@@ -56,6 +56,6 @@ export type SavedQueryObject = {
|
||||
id: number;
|
||||
label: string;
|
||||
schema: string;
|
||||
sql: string;
|
||||
sql: string | null;
|
||||
sql_tables?: { catalog?: string; schema: string; table: string }[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user