File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def entity_with_parent(client):
213
213
def properties (client ):
214
214
# [START datastore_properties]
215
215
key = client .key ("Task" )
216
- task = datastore .Entity (key , exclude_from_indexes = [ "description" ] )
216
+ task = datastore .Entity (key , exclude_from_indexes = ( "description" ,) )
217
217
task .update (
218
218
{
219
219
"category" : "Personal" ,
@@ -224,6 +224,7 @@ def properties(client):
224
224
"percent_complete" : 10.5 ,
225
225
}
226
226
)
227
+ client .put (task )
227
228
# [END datastore_properties]
228
229
229
230
return task
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def add_task(client: datastore.Client, description: str):
45
45
46
46
# Create an unsaved Entity object, and tell Datastore not to index the
47
47
# `description` field
48
- task = datastore .Entity (key , exclude_from_indexes = [ "description" ] )
48
+ task = datastore .Entity (key , exclude_from_indexes = ( "description" ,) )
49
49
50
50
# Apply new field values and save the Task entity to Datastore
51
51
task .update (
You can’t perform that action at this time.
0 commit comments