Added note that get_or_create contains a race condition

Refs #478
This commit is contained in:
Ross Lawley 2012-05-09 12:08:00 +01:00
parent f48af8db3b
commit eb54037b66

View File

@ -793,6 +793,9 @@ class QuerySet(object):
dictionary of default values for the new document may be provided as a
keyword argument called :attr:`defaults`.
.. note:: This requires two separate operations and therefore a
potential race condition exists.
:param write_options: optional extra keyword arguments used if we
have to create a new document.
Passes any write_options onto :meth:`~mongoengine.Document.save`