We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 389fe1e commit 1e231a3Copy full SHA for 1e231a3
mongoengine/pymongo_support.py
@@ -7,9 +7,12 @@
7
8
PYMONGO_VERSION = tuple(pymongo.version_tuple[:2])
9
10
-LEGACY_JSON_OPTIONS = json_util.LEGACY_JSON_OPTIONS.with_options(
11
- uuid_representation=binary.UuidRepresentation.PYTHON_LEGACY,
12
-)
+if PYMONGO_VERSION >= (4,):
+ LEGACY_JSON_OPTIONS = json_util.LEGACY_JSON_OPTIONS.with_options(
+ uuid_representation=binary.UuidRepresentation.PYTHON_LEGACY,
13
+ )
14
+else:
15
+ LEGACY_JSON_OPTIONS = json_util.DEFAULT_JSON_OPTIONS
16
17
18
def count_documents(
0 commit comments