mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 09:27:23 -05:00
MongoDB: fix for empty username/password (#7487)
This commit is contained in:
@@ -215,10 +215,10 @@ class MongoDB(BaseQueryRunner):
|
||||
if readPreference:
|
||||
kwargs["readPreference"] = readPreference
|
||||
|
||||
if "username" in self.configuration:
|
||||
if self.configuration.get("username"):
|
||||
kwargs["username"] = self.configuration["username"]
|
||||
|
||||
if "password" in self.configuration:
|
||||
if self.configuration.get("password"):
|
||||
kwargs["password"] = self.configuration["password"]
|
||||
|
||||
db_connection = pymongo.MongoClient(self.configuration["connectionString"], **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user