Skip to content

Commit

Permalink
Small improvement for resolving connection string (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amnah199 authored Aug 1, 2024
1 parent eab212a commit fa4c6cc
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fa4c6cc

Please sign in to comment.