This is an automated email from the ASF dual-hosted git repository. villebro pushed a commit to branch 1.5 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 1e567999d99d32b487697c3a81d50af206ce20dd Author: Ville Brofeldt <[email protected]> AuthorDate: Thu Apr 7 13:43:17 2022 +0300 fix(dataset): avoid crash if database missing (#19582) (cherry picked from commit db2135109a2b41240547653c845854422adaa92b) --- superset-frontend/src/components/Datasource/DatasourceEditor.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx index 1b6de1c7a9..15f9afa447 100644 --- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx @@ -1001,10 +1001,10 @@ class DatasourceEditor extends React.PureComponent { database={{ ...datasource.database, database_name: - datasource.database.database_name || - datasource.database.name, + datasource.database?.database_name || + datasource.database?.name, }} - dbId={datasource.database.id} + dbId={datasource.database?.id} handleError={this.props.addDangerToast} schema={datasource.schema} sqlLabMode={false}
