We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0475d5e commit 9bd8642Copy full SHA for 9bd8642
gcloud/datastore/helpers.py
@@ -61,6 +61,7 @@ def get_protobuf_attribute_and_value(val):
61
62
63
def get_value_from_value_pb(value_pb):
64
+ from entity import Entity
65
"""Given a protobuf for a Property, get the correct value.
66
67
The Cloud Datastore Protobuf API returns a Property Protobuf
@@ -102,7 +103,7 @@ def get_value_from_value_pb(value_pb):
102
103
return value_pb.blob_value
104
105
elif value_pb.HasField('entity_value'):
- return value_pb.entity_value
106
+ return Entity.from_protobuf(value_pb.entity_value)
107
108
elif value_pb.list_value:
109
return [get_value_from_value_pb(k) for k in value_pb.list_value]
0 commit comments