Merge pull request #2160 from vainu-arto/fix-trust-default-cursor-timeout
Only set no_cursor_timeout when requested
This commit is contained in:
@@ -1577,7 +1577,10 @@ class BaseQuerySet(object):
|
||||
if self._snapshot:
|
||||
msg = "The snapshot option is not anymore available with PyMongo 3+"
|
||||
warnings.warn(msg, DeprecationWarning)
|
||||
cursor_args = {"no_cursor_timeout": not self._timeout}
|
||||
|
||||
cursor_args = {}
|
||||
if not self._timeout:
|
||||
cursor_args["no_cursor_timeout"] = True
|
||||
|
||||
if self._loaded_fields:
|
||||
cursor_args[fields_name] = self._loaded_fields.as_dict()
|
||||
|
||||
Reference in New Issue
Block a user