@@ -151,7 +151,8 @@ def from_protobuf(cls, pb, dataset=None):
151151 :returns: The :class:`Entity` derived from the
152152 :class:`gcloud.datastore.datastore_v1_pb2.Entity`.
153153 """
154- key = _helpers ._FACTORIES .invoke ('Key_pb' , pb .key , dataset = dataset )
154+ key = _helpers ._FACTORIES .invoke (
155+ 'Key_from_protobuf' , pb .key , dataset = dataset )
155156 entity = cls .from_key (key )
156157
157158 for property_pb in pb .property :
@@ -223,7 +224,8 @@ def save(self):
223224 transaction .add_auto_id_entity (self )
224225
225226 if isinstance (key_pb , datastore_pb .Key ):
226- updated_key = _helpers ._FACTORIES .invoke ('Key_pb' , key_pb , dataset )
227+ updated_key = _helpers ._FACTORIES .invoke (
228+ 'Key_from_protobuf' , key_pb , dataset )
227229 # Update the path (which may have been altered).
228230 self ._key = key .path (updated_key .path ())
229231
@@ -253,4 +255,4 @@ def __repr__(self):
253255
254256
255257_helpers ._FACTORIES .register ('Entity' , Entity )
256- _helpers ._FACTORIES .register ('Entity_pb ' , Entity .from_protobuf )
258+ _helpers ._FACTORIES .register ('Entity_from_protobuf ' , Entity .from_protobuf )
0 commit comments