Skip to content

Commit 79ff1a3

Browse files
committed
fix empty set
1 parent ef50cc7 commit 79ff1a3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

gcloud/datastore/connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ def save_entity(self, dataset_id, key_pb, properties,
407407
insert.key.CopyFrom(key_pb)
408408

409409
for name, value in properties.items():
410+
if isinstance(value, list) and len(value) == 0:
411+
continue
412+
410413
prop = insert.property.add()
411414
# Set the name of the property.
412415
prop.name = name

0 commit comments

Comments
 (0)