Skip to content

Commit

Permalink
Adding back dataset's connection in Entity.reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Jan 6, 2015
1 parent 62204e7 commit c8e145f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gcloud/datastore/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ def reload(self):
exist only locally.
"""
key = self._must_key
entity = key.get()
connection = self._must_dataset.connection()
entity = key.get(connection=connection)

if entity:
self.update(entity)
Expand Down
3 changes: 2 additions & 1 deletion gcloud/datastore/test_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ def is_partial(self):
def path(self):
return self._path

def get(self):
def get(self, connection=None):
self._connection_used = connection
return self._stored


Expand Down

0 comments on commit c8e145f

Please sign in to comment.