Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default auth_source to None instead of self.database #981

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/maggma/stores/mongolike.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(
username: Username for the collection
password: Password to connect with
safe_update: fail gracefully on DocumentTooLarge errors on update
auth_source: The database to authenticate on. Defaults to the database name.
auth_source: The database to authenticate on. Defaults to None.
default_sort: Default sort field and direction to use when querying. Can be used to
ensure determinacy in query results.
"""
Expand All @@ -76,9 +76,6 @@ def __init__(
self.default_sort = default_sort
self._coll = None # type: ignore
self.kwargs = kwargs

if auth_source is None:
auth_source = self.database
self.auth_source = auth_source
self.mongoclient_kwargs = mongoclient_kwargs or {}

Expand Down
Loading