Remove duplicate 'flavorId' in directives 41/88841/1
authorRuoyu Ying <ruoyu.ying@intel.com>
Thu, 30 May 2019 17:45:07 +0000 (01:45 +0800)
committerRuoyu Ying <ruoyu.ying@intel.com>
Thu, 30 May 2019 17:46:46 +0000 (01:46 +0800)
Issue-ID: OPTFRA-499
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
Change-Id: Ic680060a8bdff7ea0fb5ae91da80e872ccbd0b49

conductor/conductor/data/service.py

index 09756d2..0b66b22 100644 (file)
@@ -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