We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e69283f commit a6298f2Copy full SHA for a6298f2
redash/query_runner/mongodb.py
@@ -215,10 +215,10 @@ def _get_db(self):
215
if readPreference:
216
kwargs["readPreference"] = readPreference
217
218
- if "username" in self.configuration:
+ if self.configuration.get("username"):
219
kwargs["username"] = self.configuration["username"]
220
221
- if "password" in self.configuration:
+ if self.configuration.get("password"):
222
kwargs["password"] = self.configuration["password"]
223
224
db_connection = pymongo.MongoClient(self.configuration["connectionString"], **kwargs)
0 commit comments