Merge pull request #1304 from xiaost/fix-no-cursor-timeout
Fix no_cursor_timeout with pymongo3
This commit is contained in:
commit
3469ed7ab9
@ -1462,7 +1462,7 @@ class BaseQuerySet(object):
|
|||||||
msg = "The snapshot option is not anymore available with PyMongo 3+"
|
msg = "The snapshot option is not anymore available with PyMongo 3+"
|
||||||
warnings.warn(msg, DeprecationWarning)
|
warnings.warn(msg, DeprecationWarning)
|
||||||
cursor_args = {
|
cursor_args = {
|
||||||
'no_cursor_timeout': self._timeout
|
'no_cursor_timeout': not self._timeout
|
||||||
}
|
}
|
||||||
if self._loaded_fields:
|
if self._loaded_fields:
|
||||||
cursor_args[fields_name] = self._loaded_fields.as_dict()
|
cursor_args[fields_name] = self._loaded_fields.as_dict()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user