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