From 5a8e5e5a40c2453f99fc9882b8bdae61eefefc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schulthei=C3=9F?= Date: Tue, 27 Oct 2020 16:34:57 +0100 Subject: [PATCH] updated docstring --- mongoengine/document.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mongoengine/document.py b/mongoengine/document.py index a3a30bc1..2dcd3116 100644 --- a/mongoengine/document.py +++ b/mongoengine/document.py @@ -492,6 +492,9 @@ class Document(BaseDocument, metaclass=TopLevelDocumentMetaclass): return update_doc def _integrate_shard_key(self, doc, select_dict): + """Integrates the collection's shard key to the `select_dict`, which will be used for the query. + The value from the shard key is taken from the `doc` and finally the select_dict is returned. + """ # Need to add shard key to query, or you get an error shard_key = self._meta.get("shard_key", tuple()) @@ -505,7 +508,6 @@ class Document(BaseDocument, metaclass=TopLevelDocumentMetaclass): return select_dict - def _save_update(self, doc, save_condition, write_concern): """Update an existing document.