diff options
author | Dr. Jens Harbott <harbott@osism.tech> | 2022-07-07 13:03:57 +0200 |
---|---|---|
committer | Dr. Jens Harbott <harbott@osism.tech> | 2022-07-07 13:09:22 +0200 |
commit | 0d0d339cc6050122babb82d402c4d045d49c6629 (patch) | |
tree | 42b2222dcbebb40af7851e555ab7c21c84b90acc | |
parent | 041eda6d833165ab17eba3a380b26bef46b28a17 (diff) | |
download | python-designateclient-0d0d339cc6050122babb82d402c4d045d49c6629.tar.gz |
Fix quota list command for non-admin users5.0.0
Due to a logic error the all-projects header was being set if no
explicit project was being specified.
Closes-Bug: 1980942
Change-Id: I3c492b4ffd1b75a42a6a152b1dea219e4986f411
-rw-r--r-- | designateclient/v2/cli/quotas.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/designateclient/v2/cli/quotas.py b/designateclient/v2/cli/quotas.py index c015080..a6fcda7 100644 --- a/designateclient/v2/cli/quotas.py +++ b/designateclient/v2/cli/quotas.py @@ -53,9 +53,10 @@ class ListQuotasCommand(show.ShowOne): client = self.app.client_manager.dns common.set_all_common_headers(client, parsed_args) - proj_id = parsed_args.project_id or client.session.get_project_id() + proj_id = client.session.get_project_id() - if parsed_args.project_id != client.session.get_project_id(): + if parsed_args.project_id and parsed_args.project_id != proj_id: + proj_id = parsed_args.project_id common.set_all_projects(client, True) data = client.quotas.list(proj_id) |