From: Ruoyu Ying Date: Thu, 30 May 2019 17:45:07 +0000 (+0800) Subject: Remove duplicate 'flavorId' in directives X-Git-Tag: 1.3.2~3^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=016cda4cbd023bb77c9838ca3a30ceac9c5308d2;p=optf%2Fhas.git Remove duplicate 'flavorId' in directives Issue-ID: OPTFRA-499 Signed-off-by: Ruoyu Ying Change-Id: Ic680060a8bdff7ea0fb5ae91da80e872ccbd0b49 --- 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