Skip to content

Commit

Permalink
Merge pull request #516 from materialsproject/mongo_patch
Browse files Browse the repository at this point in the history
Patch mongo store connect methods
  • Loading branch information
munrojm committed Dec 1, 2021
2 parents 634afe3 + b9cf95c commit 603c930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/maggma/stores/mongolike.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def connect(self, force_reset: bool = False):
"""
Connect to the source data
"""
if not self._collection or force_reset:
if self._collection is None or force_reset:
if self.ssh_tunnel is None:
conn = MongoClient(self.host, self.port)
else:
Expand Down Expand Up @@ -549,7 +549,7 @@ def connect(self, force_reset: bool = False):
Connect to the source data
"""

if not self._collection or force_reset:
if self._collection is None or force_reset:
self._collection = mongomock.MongoClient().db[self.name]

@property
Expand Down

0 comments on commit 603c930

Please sign in to comment.