Avoid duplicated project_id when show network

Project_id appear twice when show network. This
patch check and not append if it already has one.

Change-Id: I4400239f454522101b639a0412050dd60eb6a612
Closes-Bug: #1636123
Partially-Implements: blueprint duplicated-project-id
This commit is contained in:
judy-yu 2016-10-24 17:16:48 +08:00
parent be9306f1d4
commit 151c161a5e
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ def _get_columns(item):
columns = list(item.keys())
if 'tenant_id' in columns:
columns.remove('tenant_id')
if 'project_id' not in columns:
columns.append('project_id')
return tuple(sorted(columns))