Correct and improve docstring on EmbeddedDocumentList.create()

This commit is contained in:
Kes 2020-03-26 17:23:16 +01:00 committed by GitHub
parent f49baf5d90
commit ce74978b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,11 +303,11 @@ class EmbeddedDocumentList(BaseList):
def create(self, **values): 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:: .. note::
The embedded document changes are not automatically saved the instance of the EmbeddedDocument is not automatically saved to the database.
to the database after calling this method. You still need to call save() o this EmbeddedDocumentList.
:param values: A dictionary of values for the embedded document. :param values: A dictionary of values for the embedded document.
:return: The new embedded document instance. :return: The new embedded document instance.