Closed
Description
if a property is list_value
and the property name is included in exclude_from_indexes
the following exception will raise.
The protobuf file has describe this behavior
// A list value.
// Cannot contain another list value.
// Cannot also have a meaning and indexing set.
repeated Value list_value = 7;
File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/entity.py", line 244, in save
exclude_from_indexes=self.exclude_from_indexes())
File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/connection.py", line 425, in save_entity
result = self.commit(dataset_id, mutation)
File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/connection.py", line 329, in commit
datastore_pb.CommitResponse)
File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/connection.py", line 81, in _rpc
data=request_pb.SerializeToString())
File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/connection.py", line 59, in _request
raise Exception('Request failed. Error was: %s' % content)
Exception: Request failed. Error was: A Value containing a list_value cannot specify indexed.
An example
entity = Dataset(dataset, kind, exclude_from_indexes=('a',))
entity['a'] = [1,2,3]
entity.save()