From 59b1f679e773b21ef81e7f46064a9a854dbf6eca Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 27 Mar 2018 15:50:51 +0700 Subject: [PATCH] Replace usage of 'tenant' by 'project_id' DeprecationWarning: Property 'tenant' has moved to 'project_id' in version '2.6' and will be removed in version '3.0' Change-Id: I569fecbbfaa05de81ff2fdee8d208dd434ea48c4 --- cloudkitty/api/v1/controllers/report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudkitty/api/v1/controllers/report.py b/cloudkitty/api/v1/controllers/report.py index f7212e0a..0cd6ea75 100644 --- a/cloudkitty/api/v1/controllers/report.py +++ b/cloudkitty/api/v1/controllers/report.py @@ -82,7 +82,7 @@ class ReportController(rest.RestController): if all_tenants: tenant_id = None else: - tenant_context = pecan.request.context.tenant + tenant_context = pecan.request.context.project_id tenant_id = tenant_context if not tenant_id else tenant_id policy.authorize(pecan.request.context, 'report:get_total', {"tenant_id": tenant_id}) @@ -118,7 +118,7 @@ class ReportController(rest.RestController): if all_tenants: tenant_id = None else: - tenant_context = pecan.request.context.tenant + tenant_context = pecan.request.context.project_id tenant_id = tenant_context if not tenant_id else tenant_id policy.authorize(pecan.request.context, 'report:get_summary', {"tenant_id": tenant_id})