mirror of https://github.com/apache/superset.git
Fix TEST CONNECTION on a newly added database. (#1168)
This addresses issue #1167 If the database name passed in the request is not found in the db, test using the sqlalchemy uri passed.
This commit is contained in:
parent
2f2ed229fb
commit
bc7d0ffad2
|
@ -1270,7 +1270,7 @@ class Caravel(BaseCaravelView):
|
|||
.filter_by(database_name=db_name)
|
||||
.first()
|
||||
)
|
||||
if uri == database.safe_sqlalchemy_uri():
|
||||
if database and uri == database.safe_sqlalchemy_uri():
|
||||
# the password-masked uri was passed
|
||||
# use the URI associated with this database
|
||||
uri = database.sqlalchemy_uri_decrypted
|
||||
|
|
Loading…
Reference in New Issue