diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/utils/mongo_access.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/utils/mongo_access.py b/app/utils/mongo_access.py index 1425017..6277ace 100644 --- a/app/utils/mongo_access.py +++ b/app/utils/mongo_access.py @@ -94,11 +94,13 @@ class MongoAccess(DictNamingConverter): def prepare_connect_uri(self): params = self.connect_params - self.log.debug('connecting to MongoDb server: {}' + self.log.debug('connecting to MongoDB server: {}' .format(params['server'])) uri = 'mongodb://' - if 'password' in params: - uri = uri + params['user'] + ':' + params['password'] + '@' + if 'pwd' in params: + uri = uri + params['user'] + ':' + params['pwd'] + '@' + else: + self.log.info('MongoDB credentials missing') uri = uri + params['server'] if 'auth_db' in params: uri = uri + '/' + params['auth_db'] |