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
This commit is contained in:
Vu Cong Tuan 2018-03-27 15:50:51 +07:00
parent 542c16598e
commit 59b1f679e7
1 changed files with 2 additions and 2 deletions

View File

@ -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})