summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Jens Harbott <harbott@osism.tech>2022-07-07 13:03:57 +0200
committerDr. Jens Harbott <harbott@osism.tech>2022-07-07 13:09:22 +0200
commit0d0d339cc6050122babb82d402c4d045d49c6629 (patch)
tree42b2222dcbebb40af7851e555ab7c21c84b90acc
parent041eda6d833165ab17eba3a380b26bef46b28a17 (diff)
downloadpython-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.py5
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)