Allow setting the read concern to None
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user