Skip to content

Commit c40a8c5

Browse files
committed
Current docs include actual ObjectId in example code. Example code broken. Fixed to use Object id from variable "t".
1 parent e2a9fbb commit c40a8c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/tutorial/perform-two-phase-commits.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ to set remove the pending transaction from the :term:`documents
229229

230230
.. code-block:: javascript
231231

232-
db.accounts.update({name: t.source}, {$pull: {pendingTransactions: ObjectId("4d7bc7a8b8a04f5126961522")}})
233-
db.accounts.update({name: t.destination}, {$pull: {pendingTransactions: ObjectId("4d7bc7a8b8a04f5126961522")}})
232+
db.accounts.update({name: t.source}, {$pull: {pendingTransactions: t._id}})
233+
db.accounts.update({name: t.destination}, {$pull: {pendingTransactions: t._id}})
234234
db.accounts.find()
235235

236236
The :method:`find() <db.collection.find()>` operation will return the

0 commit comments

Comments
 (0)