fix(sqllab): unable to remove table (#27636)

This commit is contained in:
JUST.in DO IT
2024-03-26 10:19:50 -07:00
committed by GitHub
parent ce210eebde
commit fa3fea9dd8
2 changed files with 27 additions and 5 deletions

View File

@@ -1131,9 +1131,11 @@ export function removeTables(tables) {
const sync = isFeatureEnabled(FeatureFlag.SqllabBackendPersistence)
? Promise.all(
tablesToRemove.map(table =>
SupersetClient.delete({
endpoint: encodeURI(`/tableschemaview/${table.id}`),
}),
table.initialized
? SupersetClient.delete({
endpoint: encodeURI(`/tableschemaview/${table.id}`),
})
: Promise.resolve(),
),
)
: Promise.resolve();