fix: handle empty catalog when DB supports them (#29840)

This commit is contained in:
Beto Dealmeida
2024-08-13 10:08:43 -04:00
committed by GitHub
parent 9f5eb899e8
commit 39209c2b40
23 changed files with 100 additions and 148 deletions

View File

@@ -239,6 +239,7 @@ class TableSchemaView(BaseSupersetView):
db.session.query(TableSchema).filter(
TableSchema.tab_state_id == table["queryEditorId"],
TableSchema.database_id == table["dbId"],
TableSchema.catalog == table["catalog"],
TableSchema.schema == table["schema"],
TableSchema.table == table["name"],
).delete(synchronize_session=False)
@@ -246,6 +247,7 @@ class TableSchemaView(BaseSupersetView):
table_schema = TableSchema(
tab_state_id=table["queryEditorId"],
database_id=table["dbId"],
catalog=table["catalog"],
schema=table["schema"],
table=table["name"],
description=json.dumps(table),