Skip to content

Commit

Permalink
Merge pull request #299 from mbercx/master
Browse files Browse the repository at this point in the history
fix: CalcDb: pass the authsource to db.authenticate
  • Loading branch information
computron authored Aug 6, 2019
2 parents 4a93975 + 156cb76 commit 6fc9f36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atomate/utils/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def __init__(self, host, port, database, collection, user, password, **kwargs):
raise Exception
try:
if self.user:
self.db.authenticate(self.user, self.password)
self.db.authenticate(self.user, self.password,
source=kwargs.get("authsource", None))
except:
logger.error("Mongodb authentication failed")
raise ValueError
Expand Down

0 comments on commit 6fc9f36

Please sign in to comment.