Skip to content

Resource Manager Labels Update is broke #2940

Description

@waprin

The resource manager update fails when setting a label, in the style according to the docs.

>>>client=resource_manager.Client()
>>>project=client.fetch_project('purple-spaceship-124')
>>>project.labels['color'] ='purple'>>>project<Project: None ('purple-spaceship-124')>>>>project.update()
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/Users/waprin/.virtualenvs/resourcemanager/lib/python2.7/site-packages/google/cloud/resource_manager/project.py", line207, inupdatemethod='PUT', path=self.path, data=data)
File"/Users/waprin/.virtualenvs/resourcemanager/lib/python2.7/site-packages/google/cloud/_http.py", line336, inapi_requesterror_info=method+' '+url)
google.cloud.exceptions.BadRequest: 400Requestcontainsaninvalidargument. (PUThttps://cloudresourcemanager.googleapis.com/v1beta1/projects/purple-spaceship-124)

Will likely submit a PR to fix this myself, digging into it, making issue in case I'm doing something silly.

Metadata

Metadata

Assignees

Labels

api: cloudresourcemanagerIssues related to the Resource Manager API.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