Skip to content

Commit 29db9b1

Browse files
committed
Adding back dataset's connection in Entity.reload.
1 parent 6479182 commit 29db9b1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

gcloud/datastore/entity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ def reload(self):
213213
exist only locally.
214214
"""
215215
key = self._must_key
216-
entity = key.get()
216+
connection = self._must_dataset.connection()
217+
entity = key.get(connection=connection)
217218

218219
if entity:
219220
self.update(entity)

gcloud/datastore/test_entity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ def is_partial(self):
264264
def path(self):
265265
return self._path
266266

267-
def get(self):
267+
def get(self, connection=None):
268+
self._connection_used = connection
268269
return self._stored
269270

270271

0 commit comments

Comments
 (0)