fix: available endpoint showing specs without drivers (#15587)

This commit is contained in:
Beto Dealmeida 2021-07-08 09:20:52 -07:00 committed by GitHub
parent 4f5f9287fc
commit 301b94f49a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -919,6 +919,9 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
preferred_databases: List[str] = app.config.get("PREFERRED_DATABASES", [])
available_databases = []
for engine_spec, drivers in get_available_engine_specs().items():
if not drivers:
continue
payload: Dict[str, Any] = {
"name": engine_spec.engine_name,
"engine": engine_spec.engine,