Skip to content

Commit

Permalink
fix(saved query): handle null sql field (apache#11679)
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai authored and auxten committed Nov 20, 2020
1 parent 206c9b4 commit 5eb0654
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }[];
};

0 comments on commit 5eb0654

Please sign in to comment.