From e46779f87b8c6cc154d90939f10d35ffd06469ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malthe=20J=C3=B8rgensen?= Date: Tue, 27 Mar 2018 14:14:08 +0200 Subject: [PATCH] Docs, queryset.update: `full_result`-arg not clearly described The documentation for the `full_result`-argument to `queryset.update()` can be read as returning the update documents/objects, whereas it's really returning just the full "PyMongo result dictionary". This commit adds some wording and an example dictionary, to make it clear what the behavior is. --- mongoengine/queryset/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mongoengine/queryset/base.py b/mongoengine/queryset/base.py index 6f9c372c..bf8a5b55 100644 --- a/mongoengine/queryset/base.py +++ b/mongoengine/queryset/base.py @@ -486,8 +486,9 @@ class BaseQuerySet(object): ``save(..., write_concern={w: 2, fsync: True}, ...)`` will wait until at least two servers have recorded the write and will force an fsync on the primary server. - :param full_result: Return the full result rather than just the number - updated. + :param full_result: Return the full result dictionary rather than just the number + updated, e.g. return + `{u'n': 2, u'nModified': 2, u'ok': 1.0, 'updatedExisting': True}`. :param update: Django-style update keyword arguments .. versionadded:: 0.2