Skip to content

Commit 1daa9bb

Browse files
authored
Merge pull request #293 from mhsiron/patch-1
Fixing db authentication error- update database.py
2 parents 3acdfc2 + 3b8c6ef commit 1daa9bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

atomate/utils/database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def from_db_file(cls, db_file, admin=True):
128128
kwargs = {}
129129
if "authsource" in creds:
130130
kwargs["authsource"] = creds["authsource"]
131+
else:
132+
kwargs["authsource"] = creds["database"]
131133

132134
return cls(creds["host"], int(creds["port"]), creds["database"], creds["collection"],
133135
user, password, **kwargs)

0 commit comments

Comments
 (0)