diff --git a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py index 88eec4aed..93eb87005 100644 --- a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py +++ b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py @@ -82,7 +82,6 @@ def __init__( msg = f'Invalid collection name: "{collection_name}". It can only contain letters, numbers, -, or _.' raise ValueError(msg) - self.resolved_connection_string = mongo_connection_string.resolve_value() self.mongo_connection_string = mongo_connection_string self.database_name = database_name @@ -95,7 +94,7 @@ def __init__( def connection(self) -> MongoClient: if self._connection is None: self._connection = MongoClient( - self.resolved_connection_string, driver=DriverInfo(name="MongoDBAtlasHaystackIntegration") + self.mongo_connection_string.resolve_value(), driver=DriverInfo(name="MongoDBAtlasHaystackIntegration") ) return self._connection