Skip to content

Commit 8913a74

Browse files
committed
Allow setting the read concern to None
1 parent af35b25 commit 8913a74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongoengine/queryset/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ def read_concern(self, read_concern):
12271227
raise TypeError("%r is not a valid read concern." % (read_concern,))
12281228

12291229
queryset = self.clone()
1230-
queryset._read_concern = ReadConcern(**read_concern)
1230+
queryset._read_concern = ReadConcern(**read_concern) if read_concern is not None else None
12311231
queryset._cursor_obj = None # we need to re-create the cursor object whenever we apply read_concern
12321232
return queryset
12331233

0 commit comments

Comments
 (0)