Prevent UnboudLocalError when checking out tenants for packages
Before an UnboudLocalError would be thrown in case keystone returned an error, when asking for tenant list on 'Package Definitions' tab. This patch initialises the variable, to prevent such errors. Change-Id: I2ee359959907a4d67baa26fbc37d71f6477dfb35 Related-Bug: 1496418
This commit is contained in:
parent
feeb14f8b8
commit
071c61f3b2
|
@ -123,6 +123,7 @@ class PackageDefinitionsView(horizon_tables.DataTableView):
|
|||
|
||||
# Add information about project tenant for admin user
|
||||
if self.request.user.is_superuser:
|
||||
tenants = []
|
||||
try:
|
||||
tenants, _more = keystone.tenant_list(self.request)
|
||||
except Exception:
|
||||
|
|
Loading…
Reference in New Issue