mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
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)
|
.filter_by(database_name=db_name)
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
if uri == database.safe_sqlalchemy_uri():
|
if database and uri == database.safe_sqlalchemy_uri():
|
||||||
# the password-masked uri was passed
|
# the password-masked uri was passed
|
||||||
# use the URI associated with this database
|
# use the URI associated with this database
|
||||||
uri = database.sqlalchemy_uri_decrypted
|
uri = database.sqlalchemy_uri_decrypted
|
||||||
|
Loading…
Reference in New Issue
Block a user