summaryrefslogtreecommitdiffstats
path: root/app/utils
diff options
context:
space:
mode:
authorYaron Yogev <yaronyogev@gmail.com>2017-08-08 12:44:49 +0300
committerYaron Yogev <yaronyogev@gmail.com>2017-08-08 12:45:35 +0300
commitc681fbae72cf832b2fcb4b0d787e3615297b16df (patch)
tree1e1da905b8f4bc2b6b7a4b256819fcb676a25f59 /app/utils
parent9b931aae05fad0dab9eab39efeabcab2268a392d (diff)
call db.authenticate() after connecting to Mongo
Change-Id: I6c53cd18f1d1b2cb841aa6b72e693c81d5611d0a Signed-off-by: Yaron Yogev <yaronyogev@gmail.com>
Diffstat (limited to 'app/utils')
-rw-r--r--app/utils/mongo_access.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/utils/mongo_access.py b/app/utils/mongo_access.py
index 6277ace..d39794f 100644
--- a/app/utils/mongo_access.py
+++ b/app/utils/mongo_access.py
@@ -90,6 +90,8 @@ class MongoAccess(DictNamingConverter):
)
MongoAccess.db = getattr(MongoAccess.client,
config_params.get('auth_db', self.DB_NAME))
+ MongoAccess.db.authenticate(name=self.connect_params['user'],
+ password=self.connect_params['pwd'])
self.log.info('Connected to MongoDB')
def prepare_connect_uri(self):