Allow setting the read concern to None
This commit is contained in:
parent
af35b25d15
commit
8913a74a86
@ -1227,7 +1227,7 @@ class BaseQuerySet(object):
|
||||
raise TypeError("%r is not a valid read concern." % (read_concern,))
|
||||
|
||||
queryset = self.clone()
|
||||
queryset._read_concern = ReadConcern(**read_concern)
|
||||
queryset._read_concern = ReadConcern(**read_concern) if read_concern is not None else None
|
||||
queryset._cursor_obj = None # we need to re-create the cursor object whenever we apply read_concern
|
||||
return queryset
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user