diff --git a/redash/query_runner/mongodb.py b/redash/query_runner/mongodb.py index 7b2bb8420..7a8a224e4 100644 --- a/redash/query_runner/mongodb.py +++ b/redash/query_runner/mongodb.py @@ -195,7 +195,7 @@ class MongoDB(BaseQueryRunner): if not db.command("connectionStatus")["ok"]: raise Exception("MongoDB connection error") - return db_connection[self.db_name] + return db def _merge_property_names(self, columns, document):