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

@@ -491,7 +491,7 @@ class Database(Model, AuditMixinNullable, ImportExportMixin): # pylint: disable
g.user.id,
self.db_engine_spec,
)
if hasattr(g, "user") and hasattr(g.user, "id") and oauth2_config
if oauth2_config and hasattr(g, "user") and hasattr(g.user, "id")
else None
)
# If using MySQL or Presto for example, will set url.username