From b9cf95ce21d1a3af4c538dae8c10e1a220ea6977 Mon Sep 17 00:00:00 2001 From: Jason Munro Date: Wed, 1 Dec 2021 12:04:11 -0800 Subject: [PATCH] Patch mongo store connect methods --- src/maggma/stores/mongolike.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maggma/stores/mongolike.py b/src/maggma/stores/mongolike.py index e900394f6..6cd21c0de 100644 --- a/src/maggma/stores/mongolike.py +++ b/src/maggma/stores/mongolike.py @@ -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: @@ -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