Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f5fec0f374 | ||
|
dffcc0992d |
@ -1,6 +1,6 @@
|
|||||||
import copy
|
import copy
|
||||||
import numbers
|
import numbers
|
||||||
from collections import Hashable
|
from collections.abc import Hashable
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from bson import ObjectId, json_util
|
from bson import ObjectId, json_util
|
||||||
|
@ -808,7 +808,7 @@ class Document(BaseDocument):
|
|||||||
collection = cls._get_collection()
|
collection = cls._get_collection()
|
||||||
# 746: when connection is via mongos, the read preference is not necessarily an indication that
|
# 746: when connection is via mongos, the read preference is not necessarily an indication that
|
||||||
# this code runs on a secondary
|
# this code runs on a secondary
|
||||||
if not collection.is_mongos and collection.read_preference > 1:
|
if collection.is_mongos is not None and collection.read_preference.mode > 1:
|
||||||
return
|
return
|
||||||
|
|
||||||
# determine if an index which we are creating includes
|
# determine if an index which we are creating includes
|
||||||
|
@ -6,7 +6,7 @@ import socket
|
|||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
import warnings
|
import warnings
|
||||||
from collections import Mapping
|
from collections.abc import Mapping
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
from bson import Binary, DBRef, ObjectId, SON
|
from bson import Binary, DBRef, ObjectId, SON
|
||||||
|
Loading…
x
Reference in New Issue
Block a user