From ce74978b1ece68710b33295524b7563271cd44d4 Mon Sep 17 00:00:00 2001 From: Kes Date: Thu, 26 Mar 2020 17:23:16 +0100 Subject: [PATCH 1/3] Correct and improve docstring on EmbeddedDocumentList.create() --- mongoengine/base/datastructures.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mongoengine/base/datastructures.py b/mongoengine/base/datastructures.py index dcc1f092..0572e22e 100644 --- a/mongoengine/base/datastructures.py +++ b/mongoengine/base/datastructures.py @@ -303,11 +303,11 @@ class EmbeddedDocumentList(BaseList): def create(self, **values): """ - Creates a new embedded document and saves it to the database. + Creates a new instance of the EmbeddedDocument and appends it to this EmbeddedDocumentList. .. note:: - The embedded document changes are not automatically saved - to the database after calling this method. + the instance of the EmbeddedDocument is not automatically saved to the database. + You still need to call save() o this EmbeddedDocumentList. :param values: A dictionary of values for the embedded document. :return: The new embedded document instance. From d73f0bb1af7fa63424137174da76f89dca762010 Mon Sep 17 00:00:00 2001 From: Kes Date: Thu, 26 Mar 2020 17:25:25 +0100 Subject: [PATCH 2/3] fix typo --- mongoengine/base/datastructures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoengine/base/datastructures.py b/mongoengine/base/datastructures.py index 0572e22e..fd93c1db 100644 --- a/mongoengine/base/datastructures.py +++ b/mongoengine/base/datastructures.py @@ -307,7 +307,7 @@ class EmbeddedDocumentList(BaseList): .. note:: the instance of the EmbeddedDocument is not automatically saved to the database. - You still need to call save() o this EmbeddedDocumentList. + You still need to call save() on this EmbeddedDocumentList. :param values: A dictionary of values for the embedded document. :return: The new embedded document instance. From fd0095b73f9130bd537a07dc5b13c329ef16a871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20G=C3=A9rard?= Date: Sun, 26 Apr 2020 22:28:14 +0200 Subject: [PATCH 3/3] improve recent docstring of EmbeddedDocumentList.create --- mongoengine/base/datastructures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoengine/base/datastructures.py b/mongoengine/base/datastructures.py index 85f05c9b..d08d4930 100644 --- a/mongoengine/base/datastructures.py +++ b/mongoengine/base/datastructures.py @@ -293,7 +293,7 @@ class EmbeddedDocumentList(BaseList): .. note:: the instance of the EmbeddedDocument is not automatically saved to the database. - You still need to call save() on this EmbeddedDocumentList. + You still need to call .save() on the parent Document. :param values: A dictionary of values for the embedded document. :return: The new embedded document instance.