Skip to content

Commit a7eb5d9

Browse files
committed
Fix: For an array_value, subvalues must either all be indexed
1 parent ce96e85 commit a7eb5d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datastore/google/cloud/datastore/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def entity_from_protobuf(pb):
134134
# Check if ``value_pb`` was excluded from index. Lists need to be
135135
# special-cased and we require all ``exclude_from_indexes`` values
136136
# in a list agree.
137-
if is_list:
137+
if is_list and len(value) > 0:
138138
exclude_values = set(value_pb.exclude_from_indexes
139139
for value_pb in value_pb.array_value.values)
140140
if len(exclude_values) != 1:

0 commit comments

Comments
 (0)