You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user 1 reads document 1 (or - read document 1 into variable v1)
user 2 reads document 1 (or - read document 1 into variable v2)
user 1 deletes document 1 (or - perform v1.delete())
user 2 updates one field in document 1 (or - change value of one field in v2, and perform v2.save())
The result is - document 1 is re-created with only one field.
The expected behavior in this case is failure of the update operation. This can be achieved by using upsert=False.
In document.py, _save_update() is using upsert=True when no save_condition is requested.
There is no actual need to use upsert=True since this method is called for updating an existing document (New documents are handled in _save_insert).
The text was updated successfully, but these errors were encountered:
To reproduce, use the following steps:
The result is - document 1 is re-created with only one field.
The expected behavior in this case is failure of the update operation. This can be achieved by using upsert=False.
In document.py, _save_update() is using upsert=True when no save_condition is requested.
There is no actual need to use upsert=True since this method is called for updating an existing document (New documents are handled in _save_insert).
The text was updated successfully, but these errors were encountered: