-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
There is a breaking change in pymongo 4.0 that was released very recently
It fails whenever we save an instance right now
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.8/site-packages/mongoengine/document.py:407: in save
self.ensure_indexes()
/usr/local/lib/python3.8/site-packages/mongoengine/document.py:897: in ensure_indexes
collection = cls._get_collection()
/usr/local/lib/python3.8/site-packages/mongoengine/document.py:220: in _get_collection
cls.ensure_indexes()
/usr/local/lib/python3.8/site-packages/mongoengine/document.py:900: in ensure_indexes
if not collection.is_mongos and collection.read_preference > 1:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Collection(Database(MongoClient(host=['mongo:27017'], document_class=dict, tz_aware=False, connect=True, read_preference=Primary()), 'cpreview_test'), 'test_document.is_mongos')
def __bool__(self):
> raise NotImplementedError("Collection objects do not implement truth "
"value testing or bool(). Please compare "
"with None instead: collection is not None")
E NotImplementedError: Collection objects do not implement truth value testing or bool(). Please compare with None instead: collection is not None
/usr/local/lib/python3.8/site-packages/pymongo/collection.py:300: NotImplementedError
Betalos, YossiTamari, victorherbemontagne, corentinalcoy, ricardoinacio and 1 more
Metadata
Metadata
Assignees
Labels
No labels