Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Entities loaded in gcloud.datastore don't have a dataset #86

Closed
@jgeewax

Description

@jgeewax
>>> dataset = demo.get_dataset()
>>> query = dataset.query()
>>> entity = query.fetch()[0]
>>> entity.delete()
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "gcloud/datastore/entity.py", line 206, in delete
    self.dataset().connection().delete_entity(
AttributeError: 'NoneType' object has no attribute 'delete_entity'

This is because we're creating entities from the protobufs, with the proper dataset_id but not a true reference to the Dataset object (which has a pointer to the connection).

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions