Skip to content

Commit 2d67133

Browse files
author
Jon Wayne Parrott
authored
Fix datastore transaction sample (GoogleCloudPlatform#602)
Change-Id: Id8ba648198f87c4d015593f091b368fdbea973cc
1 parent d0e0042 commit 2d67133

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datastore/api/snippets.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ def transactional_update(client):
652652
# [START transactional_update]
653653
def transfer_funds(client, from_key, to_key, amount):
654654
with client.transaction():
655-
from_account, to_account = client.get_multi([from_key, to_key])
655+
from_account = client.get(from_key)
656+
to_account = client.get(to_key)
656657

657658
from_account['balance'] -= amount
658659
to_account['balance'] += amount

0 commit comments

Comments
 (0)