Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions datastore/google/cloud/datastore/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ def entity_from_protobuf(pb):
if is_list:
exclude_values = set(value_pb.exclude_from_indexes
for value_pb in value_pb.array_value.values)
if len(exclude_values) != 1:
if len(exclude_values) > 1:

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

raise ValueError('For an array_value, subvalues must either '
'all be indexed or all excluded from '
'indexes.')

if exclude_values.pop():
if len(exclude_values) > 0 and exclude_values.pop():
exclude_from_indexes.append(prop_name)
else:
if value_pb.exclude_from_indexes:
Expand Down