summaryrefslogtreecommitdiffstats
path: root/conductor
diff options
context:
space:
mode:
authorRuoyu Ying <ruoyu.ying@intel.com>2019-05-31 01:45:07 +0800
committerRuoyu Ying <ruoyu.ying@intel.com>2019-05-31 01:46:46 +0800
commit016cda4cbd023bb77c9838ca3a30ceac9c5308d2 (patch)
treead2ae22e018cadc73919ba75feaaca213ababc5c /conductor
parent9ec6a47a0629a4566ab5d94a497894904fc92d94 (diff)
Remove duplicate 'flavorId' in directives
Issue-ID: OPTFRA-499 Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com> Change-Id: Ic680060a8bdff7ea0fb5ae91da80e872ccbd0b49
Diffstat (limited to 'conductor')
-rw-r--r--conductor/conductor/data/service.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/conductor/conductor/data/service.py b/conductor/conductor/data/service.py
index 09756d2..0b66b22 100644
--- a/conductor/conductor/data/service.py
+++ b/conductor/conductor/data/service.py
@@ -559,7 +559,8 @@ class DataEndpoint(object):
for ele in directives:
if "flavor_directives" in ele.get("type"):
flag = True
- ele.get("attributes").append(flavor_id_attributes)
+ if len(ele.get("attributes")) <= 1:
+ ele.get("attributes").append(flavor_id_attributes)
break
else:
flag = False