Skip to content

Commit 9bd8642

Browse files
committed
add support entity
1 parent 0475d5e commit 9bd8642

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gcloud/datastore/helpers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def get_protobuf_attribute_and_value(val):
6161

6262

6363
def get_value_from_value_pb(value_pb):
64+
from entity import Entity
6465
"""Given a protobuf for a Property, get the correct value.
6566
6667
The Cloud Datastore Protobuf API returns a Property Protobuf
@@ -102,7 +103,7 @@ def get_value_from_value_pb(value_pb):
102103
return value_pb.blob_value
103104

104105
elif value_pb.HasField('entity_value'):
105-
return value_pb.entity_value
106+
return Entity.from_protobuf(value_pb.entity_value)
106107

107108
elif value_pb.list_value:
108109
return [get_value_from_value_pb(k) for k in value_pb.list_value]

0 commit comments

Comments
 (0)