diff --git a/common/djangoapps/track/backends/mongodb.py b/common/djangoapps/track/backends/mongodb.py index b8f3e65748..07687eae98 100644 --- a/common/djangoapps/track/backends/mongodb.py +++ b/common/djangoapps/track/backends/mongodb.py @@ -28,7 +28,7 @@ class MongoBackend(BaseBackend): - `password`: collection user password - `database`: name of the database - `collection`: name of the collection - - 'auth_source': name of the authentication database + - 'authsource': name of the authentication database - `extra`: parameters to pymongo.MongoClient not listed above """ @@ -46,7 +46,7 @@ class MongoBackend(BaseBackend): db_name = kwargs.get('database', 'track') collection_name = kwargs.get('collection', 'events') - auth_source = kwargs.get('auth_source') or None + auth_source = kwargs.get('authsource') or None # Other mongo connection arguments extra = kwargs.get('extra', {}) diff --git a/common/lib/xmodule/xmodule/mongo_utils.py b/common/lib/xmodule/xmodule/mongo_utils.py index 6b6bcb8b83..d46e129a8f 100644 --- a/common/lib/xmodule/xmodule/mongo_utils.py +++ b/common/lib/xmodule/xmodule/mongo_utils.py @@ -46,7 +46,7 @@ def connect_to_mongodb( mongo_client_class = pymongo.MongoClient # If the MongoDB server uses a separate authentication database that should be specified here - auth_source = kwargs.pop('auth_source', '') or None + auth_source = kwargs.get('authsource', '') or None # If read_preference is given as a name of a valid ReadPreference. # constant such as "SECONDARY_PREFERRED" or a mongo mode such as