From f255b7035236fd7b92b2bd04fea988e6a0957e5e Mon Sep 17 00:00:00 2001 From: Jason Munro Date: Mon, 9 Jan 2023 14:44:17 -0800 Subject: [PATCH] Fix JSON and Memory store attributes --- src/maggma/stores/mongolike.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/maggma/stores/mongolike.py b/src/maggma/stores/mongolike.py index 63ae846ee..2a596ba03 100644 --- a/src/maggma/stores/mongolike.py +++ b/src/maggma/stores/mongolike.py @@ -579,6 +579,7 @@ def __init__(self, collection_name: str = "memory_db", **kwargs): collection_name: name for the collection in memory """ self.collection_name = collection_name + self.default_sort = None self._coll = None self.kwargs = kwargs super(MongoStore, self).__init__(**kwargs) # noqa @@ -717,6 +718,9 @@ def __init__( data: List[dict] = [] bytesdata = orjson.dumps(data) f.write(bytesdata.decode("utf-8")) + + self.default_sort = None + super().__init__(**kwargs) def connect(self, force_reset=False):