From ce74978b1ece68710b33295524b7563271cd44d4 Mon Sep 17 00:00:00 2001 From: Kes Date: Thu, 26 Mar 2020 17:23:16 +0100 Subject: [PATCH 1/2] 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/2] 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.