Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResourceManager: fix list_projects(filter_params) #5383

Merged
merged 1 commit into from
May 24, 2018

Conversation

zehauser
Copy link
Contributor

The filter_params parameter of resource_manager.Client.list_projects is
a dict (of properties to filter on and the desired value for each property).
Prior to this commit, this dict was passed into the HTTPIterator constructor
in extra_params['filter'].

This didn't work, because extra_params values can't be dicts. They can be
iterables, but since the iterable of a dict is its keys, this resulted in only
the properties being sent along in the 'filter' query param, while the desired
values for those properties were discarded.

This commit transforms the filter_params dict into a simple list prior to
shoving it in extra_params, which fixes the bug.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 24, 2018
@zehauser zehauser force-pushed the master branch 2 times, most recently from 32672a4 to bfc1530 Compare May 24, 2018 01:03
The filter_params parameter of resource_manager.Client.list_projects is
a dict (of properties to filter on and the desired value for each property).
Prior to this commit, this dict was passed into the HTTPIterator constructor
in extra_params['filter'].

This didn't work, because extra_params values can't be dicts. They *can* be
iterables, but since the iterable of a dict is its keys, this resulted in only
the properties being sent along in the 'filter' query param, while the desired
values for those properties were discarded.

This commit transforms the filter_params dict into a simple list prior to
shoving it in extra_params, which fixes the bug.
@theacodes
Copy link
Contributor

Thanks for doing this, @zehauser!

@theacodes theacodes merged commit ccdfbff into googleapis:master May 24, 2018
@theacodes
Copy link
Contributor

@crwilcox can you cut a new release?

@zehauser
Copy link
Contributor Author

⭐️🍰🎆!

@zehauser
Copy link
Contributor Author

zehauser commented Jul 5, 2018

@crwilcox @theacodes bump to get this released when possible! :)

@tseaver tseaver added the api: cloudresourcemanager Issues related to the Resource Manager API. label Jul 5, 2018
parthea pushed a commit that referenced this pull request Jun 4, 2023
The filter_params parameter of resource_manager.Client.list_projects is
a dict (of properties to filter on and the desired value for each property).
Prior to this commit, this dict was passed into the HTTPIterator constructor
in extra_params['filter'].

This didn't work, because extra_params values can't be dicts. They *can* be
iterables, but since the iterable of a dict is its keys, this resulted in only
the properties being sent along in the 'filter' query param, while the desired
values for those properties were discarded.

This commit transforms the filter_params dict into a simple list prior to
shoving it in extra_params, which fixes the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudresourcemanager Issues related to the Resource Manager API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants